/* /public/styles/plantprofile.css */
/* Herb Profile — left column only
   Uses brand tokens from pixel-overrides/apothecary.css (e.g., --brand-gold #b08a48)
   No right-rail rules in this file. */

/* Scope everything to left column to avoid bleed */
#leftColumn .apoth-form{
  display: grid;
  gap: 0.75rem;
}

/* Title spacing (rendered by herbProfile.js as .rc-title) */
#leftColumn .apoth-form .rc-title{
  margin: 0.25rem 0 0.5rem 0;
}

/* Tabs already styled in apothecary.css; keep only minor spacing here */
/* Ensure tabs match navbar scale and never get uppercased by global pills */
#leftColumn .apoth-form .apoth-tabs{
  margin-bottom: 0.5rem;
  text-transform: none !important;
  font-size: 0.84rem !important; /* match #hubNav pill base */
}

/* Belt-and-braces: cover inner elements some themes wrap in <a>/<span> */
#leftColumn .apoth-form .apoth-tabs :is(a, span, button){
  text-transform: none !important;
  font-size: inherit !important; /* inherits 0.84rem from .apoth-tabs */
  line-height: 1.2 !important;
}
/* Make tab pills match navbar scale and kill uppercase */
/* Use a higher-specificity selector to beat global pill styles */
/* Boost specificity so this wins over any global .nav/.pill rules */
#leftColumn .apoth-form .apoth-tabs .apoth-tab{
  font-size: inherit !important;          /* 0.84rem via container */
  text-transform: none !important;
  line-height: 1.2 !important;
  padding: 0.18rem 0.48rem !important;    /* tighter so pills don’t look oversized */
  border: 1px solid var(--brand-gold, #b08a48) !important;
  border-radius: 0.5rem !important;
  display: inline-block !important;
  background: #fff !important;
  color: #000 !important;
}
/* Keep tab text black regardless of global link colors */
#leftColumn .apoth-form .apoth-tabs .apoth-tab,
#leftColumn .apoth-form .apoth-tabs .apoth-tab:link,
#leftColumn .apoth-form .apoth-tabs .apoth-tab:visited,
#leftColumn .apoth-form .apoth-tabs .apoth-tab:hover,
#leftColumn .apoth-form .apoth-tabs .apoth-tab:active,
#leftColumn .apoth-form .apoth-tabs .apoth-tab:focus{
  color: #000 !important;
}



/* Allow labels to wrap so they don't inflate line height/size */
#leftColumn .apoth-form .apoth-row label{
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: normal;
}


/* Section box is already defined in apothecary.css (#leftColumn .apoth-section).
   Add only inner spacing tweaks for form rows/fields. */
#leftColumn .apoth-form .apoth-section{
  display: grid;
  gap: 0.75rem;
}

/* Form rows: stack on xs; two-up from md+ */
#leftColumn .apoth-form .apoth-row{
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
@media (min-width: 768px){
  #leftColumn .apoth-form .apoth-row{
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

/* Generic field wrapper */
#leftColumn .apoth-form .apoth-field{
  display: grid;
  gap: 0.35rem;
}

/* Labels */
#leftColumn .apoth-form label{
  font-weight: 600;
}

/* Text inputs + textareas — match brand outline */
#leftColumn .apoth-form input[type="text"],
#leftColumn .apoth-form textarea{
  display: block;
  width: 100%;
  min-height: 38px;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--brand-gold, #b08a48);
  border-radius: 0.5rem;
  background: #fff;
  color: #000;
  line-height: 1.2;
}

/* Checkboxes/radios line-up neatly and wrap */
#leftColumn .apoth-form input[type="checkbox"],
#leftColumn .apoth-form input[type="radio"]{
  margin-right: 0.35rem;
}
#leftColumn .apoth-form .apoth-row label{
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

/* File row: label above input on xs; side-by-side on md+ */
#leftColumn .apoth-form .file-row{
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}
@media (min-width: 768px){
  #leftColumn .apoth-form .file-row{
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 0.5rem;
  }
}
/* Kill native grey look and force brand styling */
#leftColumn .apoth-form input[type="file"]{
  display: block;
  width: 100%;
  font-size: 0.95rem;
  line-height: 1.2;
  color: #000;
  background: #fff;
  border: 1px solid var(--brand-gold, #b08a48);
  border-radius: 0.5rem;
  padding: 0.2rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Style the clickable button part of the file input */
/* Force the button to brand style even when UA styles fight back */
#leftColumn .apoth-form input[type="file"]::file-selector-button{
  font: inherit !important;
  color: #000 !important;
  background: #fff !important;
  border: 1px solid var(--brand-gold, #b08a48) !important;
  border-radius: 0.5rem !important;
  padding: 0.35rem 0.6rem !important;
  margin-right: 0.6rem !important;
  cursor: pointer !important;
  appearance: none;
  -webkit-appearance: none;
}

#leftColumn .apoth-form input[type="file"]::-webkit-file-upload-button{
  font: inherit !important;
  color: #000 !important;
  background: #fff !important;
  border: 1px solid var(--brand-gold, #b08a48) !important;
  border-radius: 0.5rem !important;
  padding: 0.35rem 0.6rem !important;
  margin-right: 0.6rem !important;
  cursor: pointer !important;
  appearance: none;
  -webkit-appearance: none;
}

/* WebKit fallback */
#leftColumn .apoth-form input[type="file"]::-webkit-file-upload-button{
  font: inherit;
  color: #000;
  background: #fff;
  border: 1px solid var(--brand-gold, #b08a48);
  border-radius: 0.5rem;
  padding: 0.35rem 0.6rem;
  margin-right: 0.6rem;
  cursor: pointer;
}

/* Hover/focus */
#leftColumn .apoth-form input[type="file"]::file-selector-button:hover,
#leftColumn .apoth-form input[type="file"]::-webkit-file-upload-button:hover{
  background: rgba(176,138,72,0.08);
}

#leftColumn .apoth-form input[type="file"]:focus{
  outline: none;
  border-color: var(--brand-gold, #b08a48);
  box-shadow: 0 0 0 0.2rem rgba(176,138,72,.2);
}
/* Photo preview (right column contains #photoPreview too — this rule is left-only) */
#leftColumn #photoPreview.apoth-preview{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}

/* Thumbnail button + image */
#leftColumn .apoth-thumb-btn{
  display: inline-flex;
  padding: 0;
  border: 1px solid var(--brand-gold, #b08a48);
  border-radius: 0.5rem;
  background: #fff;
  cursor: pointer;
}
#leftColumn .apoth-thumb{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

/* Submit row separation (button uses existing .hub-btn styles) */
#leftColumn .apoth-form .apoth-row .hub-btn{
  margin-top: 0.25rem;
}

/* Focus states: align with brand */
#leftColumn .apoth-form input[type="text"]:focus,
#leftColumn .apoth-form textarea:focus,
#leftColumn .apoth-form input[type="file"]:focus{
  outline: none;
  border-color: var(--brand-gold, #b08a48);
  box-shadow: 0 0 0 0.2rem rgba(176,138,72,.2);
}

/* Dark-mode keep white fields with gold outline */
@media (prefers-color-scheme: dark){
  #leftColumn .apoth-form input[type="text"],
  #leftColumn .apoth-form textarea,
  #leftColumn .apoth-form input[type="file"]{
    background: #fff;
    color: #000;
    border-color: var(--brand-gold, #b08a48);
  }
}
