/* ==========================================================================
   Soil Grower (soilgrower.com)
   Condensed Project Intake Stylesheet (Modeled on Original Intake Layout)
   ========================================================================== */

.intake-page-container {
  max-width: 860px;
  margin: 0 auto;
  padding: calc(var(--header-height, 76px) + 2rem) 1.25rem 5rem;
  position: relative;
  z-index: 10;
}

/* Compact Header */
.intake-hero {
  text-align: center;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.intake-hero-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 0.75rem;
}

.intake-brand-sub {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-sage-light, #7E9F6E);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 0.5rem;
}

.intake-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 400;
  color: var(--text-bone);
  margin: 0 0 0.35rem;
}

.intake-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

/* Stacked Cards (space-y-6 equivalent) */
.intake-form-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.intake-card {
  background: rgba(14, 24, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.intake-card-header {
  margin-bottom: 1.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.intake-card-header h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text-bone);
  margin: 0 0 0.2rem;
}

.intake-card-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.intake-card-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Form Layout & Inputs */
.form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label,
.mini-label {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  color: #E2E8DF;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.mini-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.label-hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
}

.req {
  color: var(--accent-amber);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: rgba(8, 16, 10, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-bone);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-sage-light);
  box-shadow: 0 0 0 2px rgba(126, 159, 110, 0.2);
}

.form-select option {
  background: #0E1910;
  color: var(--text-bone);
}

/* Compact Tree Inventory Subbox */
.inventory-subbox {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
}

.inventory-subbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.inventory-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-bone);
}

.inventory-est-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-amber);
  background: rgba(212, 160, 60, 0.12);
  border: 1px solid rgba(212, 160, 60, 0.28);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.inventory-adder-row {
  display: grid;
  grid-template-columns: 5fr 2fr 4fr 42px;
  gap: 0.65rem;
  align-items: end;
}

.btn-adder-plus {
  width: 42px;
  height: 38px;
  border-radius: 6px;
  background: var(--accent-sage, #5A7A4A);
  border: 1px solid var(--accent-sage-light, #7E9F6E);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-adder-plus:hover {
  background: var(--accent-sage-light, #7E9F6E);
}

.inventory-rows-stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.inventory-rows-stack:empty {
  margin-top: 0;
}

.added-tree-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(12, 26, 14, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
}

.added-tree-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.added-tree-count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: #86efac;
  background: rgba(34, 197, 94, 0.15);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.added-tree-species {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-bone);
}

.added-tree-dbh {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.btn-remove-tree-row {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.btn-remove-tree-row:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
}

/* Compact Checkboxes & Breakout Drawers */
.compact-check-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.compact-check-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.check-breakout-item {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.check-breakout-item:has(input:checked) {
  background: rgba(90, 122, 74, 0.14);
  border-color: rgba(126, 159, 110, 0.45);
}

.compact-check-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-bone);
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
  cursor: pointer;
}

.compact-check-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-sage-light, #7E9F6E);
  cursor: pointer;
  flex-shrink: 0;
}

.compact-check-grid-3 .compact-check-label {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 400;
}

.compact-check-grid-3 .compact-check-label:has(input:checked) {
  background: rgba(90, 122, 74, 0.15);
  border-color: rgba(126, 159, 110, 0.4);
}

/* Expandable Practice Breakout Drawers */
.practice-breakout {
  margin-top: 0.15rem;
}

.practice-breakout summary {
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-sage-light, #7E9F6E);
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s ease;
}

.practice-breakout summary::-webkit-details-marker {
  display: none;
}

.practice-breakout summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: rgba(126, 159, 110, 0.18);
  color: var(--accent-amber);
  font-weight: 700;
  font-size: 0.72rem;
}

.practice-breakout[open] summary::before {
  content: "-";
}

.practice-breakout summary:hover {
  color: var(--accent-amber);
  text-decoration: underline;
}

.practice-breakout-body {
  margin-top: 0.45rem;
  padding: 0.65rem 0.75rem;
  background: rgba(6, 13, 8, 0.85);
  border: 1px solid rgba(90, 122, 74, 0.25);
  border-left: 2px solid var(--accent-amber);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.practice-breakout-body p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.45rem;
  line-height: 1.5;
}

.practice-breakout-body p:last-child {
  margin-bottom: 0;
}

/* Compost & Mulch Application Boxes (Modeled on Original Intake) */
.material-calc-box {
  padding: 0.9rem 1rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.material-calc-box.compost-box {
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.22);
}

.material-calc-box.mulch-box {
  background: rgba(212, 160, 60, 0.06);
  border: 1px solid rgba(212, 160, 60, 0.22);
}

.material-calc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.material-calc-title {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-bone);
  text-transform: none;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
}

.dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
}

.dot-amber {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-amber);
  display: inline-block;
}

.material-calc-readout {
  text-align: right;
  line-height: 1.1;
}

.readout-num {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: #4ade80;
  display: block;
}

.readout-num.amber {
  color: var(--accent-amber);
}

.readout-unit {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(74, 222, 128, 0.8);
}

.readout-unit.amber {
  color: rgba(212, 160, 60, 0.85);
}

.calc-area-notice {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-amber);
}

/* Fertilization Conditional Box */
.fert-subbox {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
}

.fert-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fert-options-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.fert-options-row[hidden] {
  display: none !important;
}

/* Featured Biologic Deep-Dive Cards (Symbiosis TX Biochar & REGENiGROW) */
.featured-biologic-card {
  background: rgba(22, 50, 28, 0.35);
  border: 1px solid rgba(74, 222, 128, 0.28);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.featured-biologic-card.algae-card {
  background: rgba(20, 44, 38, 0.38);
  border-color: rgba(126, 159, 110, 0.35);
}

.featured-biologic-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.featured-biologic-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  accent-color: #4ade80;
  cursor: pointer;
  flex-shrink: 0;
}

.featured-biologic-main {
  flex: 1;
}

.featured-biologic-title {
  font-family: var(--font-sans);
  font-size: 0.96rem;
  font-weight: 600;
  color: #86efac;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
  cursor: pointer;
}

.featured-biologic-desc {
  font-size: 0.82rem;
  color: #D0DDD2;
  line-height: 1.45;
  margin: 0.25rem 0 0.5rem;
}

.featured-deep-dive summary {
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-amber);
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.featured-deep-dive summary::-webkit-details-marker {
  display: none;
}

.featured-deep-dive summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 3px;
  background: rgba(212, 160, 60, 0.2);
  color: var(--accent-amber);
  font-weight: 700;
}

.featured-deep-dive[open] summary::before {
  content: "-";
}

.featured-deep-dive summary:hover {
  text-decoration: underline;
}

.featured-deep-dive-body {
  margin-top: 0.65rem;
  padding: 0.85rem 1rem;
  background: rgba(6, 12, 8, 0.82);
  border: 1px solid rgba(126, 159, 110, 0.28);
  border-radius: 6px;
  font-size: 0.81rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.featured-deep-dive-body p {
  font-size: 0.81rem;
  color: var(--text-bone);
  margin: 0 0 0.6rem;
  line-height: 1.55;
}

.featured-deep-dive-body ul {
  padding-left: 1.15rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.featured-deep-dive-body li {
  color: var(--text-muted);
  line-height: 1.5;
}

.featured-deep-dive-body li strong {
  color: #86efac;
}

/* Submit Card */
.btn-submit-intake {
  width: 100%;
  background: var(--accent-sage, #5A7A4A);
  color: #fff;
  border: 1px solid var(--accent-sage-light, #7E9F6E);
  border-radius: 8px;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-submit-intake:hover {
  background: var(--accent-sage-light, #7E9F6E);
  transform: translateY(-1px);
}

/* Diagnostic Confirmation Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 12, 7, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-overlay.is-visible {
  display: flex;
}

.receipt-modal-card {
  background: #121E14;
  border: 1px solid var(--accent-amber);
  border-radius: 12px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

.receipt-header {
  text-align: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.receipt-badge {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-amber);
  background: rgba(212, 160, 60, 0.15);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.receipt-header h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text-bone);
  margin-bottom: 0.35rem;
}

.receipt-id-strip {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent-amber);
}

.receipt-details-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
  font-size: 0.86rem;
}

.receipt-details-table th,
.receipt-details-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.receipt-details-table th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  width: 34%;
}

.receipt-details-table td {
  color: var(--text-bone);
}

.receipt-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.btn-modal-action {
  width: 100%;
  padding: 0.75rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-modal-action.primary {
  background: var(--accent-amber);
  color: #0C1A0E;
  border: none;
  font-weight: 600;
}

.btn-modal-action.secondary {
  background: rgba(90, 122, 74, 0.22);
  color: var(--text-bone);
  border: 1px solid rgba(90, 122, 74, 0.45);
}

.btn-modal-action.tertiary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .form-row-2,
  .compact-check-grid,
  .compact-check-grid-3,
  .fert-options-row {
    grid-template-columns: 1fr;
  }
  .inventory-adder-row {
    grid-template-columns: 1fr 1fr;
  }
  .adder-col-species {
    grid-column: 1 / -1;
  }
  .btn-adder-plus {
    width: 100%;
  }
}
