/* =====================================================================
   PLANT SELECTION TOOL STYLING & STRICT BUTTON LOCKDOWN
   ===================================================================== */
#plant-selection-tool .ps-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
  margin-top: 28px;
}

#plant-selection-tool .ps-card {
  background: #ffffff;
  border: 1px solid var(--mc-line, #E5E7EB);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 15px rgba(6,78,59,.04);
}

#plant-selection-tool .ps-card h2 {
  font-size: 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 18px !important;
  text-align: left !important;
}

#plant-selection-tool .ps-field {
  margin-bottom: 16px;
}

#plant-selection-tool .ps-field label {
  display: block;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--mc-ink, #064E3B);
  margin-bottom: 6px;
}

#plant-selection-tool select {
  width: 100% !important;
  height: 46px !important;
  padding: 0 14px !important;
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  color: #374151 !important;
  outline: none !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02) !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

#plant-selection-tool select:focus {
  border-color: #16A34A !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15) !important;
}

#plant-selection-tool .ps-extra {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
}

#plant-selection-tool .ps-extra h3 {
  font-size: 14px !important;
  color: var(--mc-ink, #064E3B);
  margin-bottom: 12px !important;
}

#plant-selection-tool .ps-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ---------------------------------------------------------------------
   HARD OVERRIDES FOR EXPORT & SEARCH BUTTONS (Eliminates Square Box Bug)
   --------------------------------------------------------------------- */
#plant-selection-tool button.ps-export-btn,
#plant-selection-tool .ps-export-btn,
#plant-selection-tool button.ps-btn,
#plant-selection-tool .ps-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  padding: 0 18px !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
  line-height: 46px !important;
  text-align: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  margin-top: 16px !important;
  margin-bottom: 0 !important;
  box-sizing: border-box !important;
  aspect-ratio: auto !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

#plant-selection-tool button.ps-btn,
#plant-selection-tool .ps-btn {
  background: var(--mc-leaf, #16A34A) !important;
  color: #ffffff !important;
  border: 1px solid transparent !important;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2) !important;
}

#plant-selection-tool button.ps-btn:hover,
#plant-selection-tool .ps-btn:hover {
  background: var(--mc-ink, #064E3B) !important;
  transform: translateY(-2px) !important;
}

#plant-selection-tool button.ps-export-btn,
#plant-selection-tool .ps-export-btn {
  background: #F0FDF4 !important;
  border: 1px solid #BBF7D0 !important;
  color: #064E3B !important;
  box-shadow: 0 2px 6px rgba(6, 78, 59, 0.04) !important;
}

#plant-selection-tool button.ps-export-btn:hover,
#plant-selection-tool .ps-export-btn:hover {
  background: #DCFCE7 !important;
  border-color: #16A34A !important;
  transform: translateY(-2px) !important;
}

#plant-selection-tool .ps-btn svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  margin-right: 8px !important;
  flex-shrink: 0 !important;
}

/* Plant Card Recommendation Output Styling */
#plant-selection-tool .ps-plant-card {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}

#plant-selection-tool .ps-plant-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

#plant-selection-tool .ps-plant-top h4 {
  font-size: 17px !important;
  color: var(--mc-ink, #064E3B);
  margin: 0 !important;
  flex: 1;
}

#plant-selection-tool .ps-emoji {
  font-size: 24px;
  line-height: 1;
}

#plant-selection-tool .ps-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

#plant-selection-tool .ps-badge-easy { background: #DCFCE7; color: #15803D; }
#plant-selection-tool .ps-badge-medium { background: #FEF3C7; color: #B45309; }
#plant-selection-tool .ps-badge-challenging { background: #FEE2E2; color: #B91C1C; }

#plant-selection-tool .ps-match-great { background: #16A34A; color: #fff; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
#plant-selection-tool .ps-match-good { background: #2563EB; color: #fff; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
#plant-selection-tool .ps-match-possible { background: #64748B; color: #fff; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }

#plant-selection-tool .ps-plant-notes {
  font-size: 13px;
  color: #334155;
  line-height: 1.5;
  margin: 0 0 10px 0;
}

#plant-selection-tool .ps-plant-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--mc-text-soft, #6B7280);
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #DCFCE7;
  margin-bottom: 10px;
}

#plant-selection-tool .ps-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid #CBD5E1;
  color: #475569;
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 4px;
  margin-bottom: 4px;
}

/* Climate Tips Styling */
#plant-selection-tool .ps-climate-tip {
  display: block;
}
#plant-selection-tool .ps-climate-tip.ps-hidden {
  display: none !important;
}

#plant-selection-tool .ps-climate-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 14px 0;
}

#plant-selection-tool .ps-climate-cols h5 {
  font-size: 13.5px !important;
  color: var(--mc-ink, #064E3B);
  margin-bottom: 6px !important;
}

#plant-selection-tool .ps-climate-cols ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--mc-text-soft, #6B7280);
  line-height: 1.5;
}

#plant-selection-tool .ps-expert-tip {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
  color: #92400E;
  line-height: 1.5;
}

/* Reference Table Cell Padding Fix */
#plant-selection-tool table th,
#plant-selection-tool table td {
  padding: 12px 16px !important;
  text-align: left;
  vertical-align: middle;
}

@media (max-width: 900px) {
  #plant-selection-tool .ps-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  #plant-selection-tool .ps-row2,
  #plant-selection-tool .ps-climate-cols {
    grid-template-columns: 1fr;
  }
}


@keyframes psSpin { to { transform: rotate(360deg); } }
