/* ===== PLANNER — BASE ===== */
/* 18px base font everywhere in the planner per design constraint */
.planner-page {
  min-height: calc(100vh - 60px);
  background: var(--cream);
  padding: 60px clamp(20px, 5vw, 80px) 100px;
}

.planner-container {
  max-width: 780px;
  margin: 0 auto;
}

.planner-container--wide {
  max-width: 1200px;
}

/* ===== STEP INDICATOR ===== */
.step-indicator {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--sage);
  margin-bottom: 12px;
}

/* ===== PLANNER HEADER ===== */
.planner-header {
  margin-bottom: 48px;
}

.planner-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.1;
  margin-bottom: 12px;
}

.planner-subtitle {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--mid);
  max-width: 560px;
}

/* ===== FORM SECTIONS ===== */
.planner-form {
  display: flex;
  flex-direction: column;
  gap: 52px;
}

.form-section {
  border: none;
  padding: 0;
  margin: 0;
}

.form-legend {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 8px;
  display: block;
}

.form-hint {
  font-size: 0.9rem;
  color: var(--mid);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ===== CHECKBOX CARDS ===== */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.checkbox-card,
.radio-card {
  display: block;
  cursor: pointer;
}

.checkbox-card input,
.radio-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-label,
.radio-label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 1.5px solid var(--faint);
  border-radius: 8px;
  background: var(--white);
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
  min-height: 80px;
}

.checkbox-card:hover .checkbox-label,
.radio-card:hover .radio-label {
  border-color: var(--sage-light);
  background: var(--sage-pale);
}

.checkbox-card.selected .checkbox-label,
.radio-card.selected .radio-label {
  border-color: var(--sage);
  background: var(--sage-pale);
}

.checkbox-icon,
.radio-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkbox-text strong,
.radio-text strong {
  display: block;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 3px;
  font-family: 'DM Mono', monospace;
}

.checkbox-text small,
.radio-text small {
  display: block;
  font-size: 0.8rem;
  color: var(--mid);
  line-height: 1.4;
}

/* ===== HOUSEHOLD OPTIONS ===== */
.household-options {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.radio-card { flex: 1; min-width: 200px; max-width: 300px; }

/* ===== FORM ACTION ===== */
.form-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.btn-primary {
  display: inline-block;
  background: var(--sage);
  color: var(--white);
  font-family: 'DM Mono', monospace;
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 18px 40px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  text-decoration: none;
}

.btn-primary:hover { background: #5a7960; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--sage);
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  font-weight: 400;
  padding: 14px 28px;
  border: 1.5px solid var(--sage);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
}

.btn-secondary:hover { background: var(--sage-pale); }

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--mid);
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  padding: 14px 24px;
  border: 1px solid var(--faint);
  border-radius: 4px;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.btn-ghost:hover { color: var(--charcoal); border-color: var(--mid); }

.form-note {
  font-size: 0.8rem;
  color: var(--mid);
}

/* ===== NAV ADDITIONS FOR PLANNER ===== */
.nav-logo { text-decoration: none; color: var(--sage); }
.nav-back {
  font-size: 0.85rem;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-back:hover { color: var(--charcoal); }

/* ===== PLAN HEADER ===== */
.plan-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.plan-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ===== DAY CARDS GRID ===== */
.days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
}

.day-plan-card {
  background: var(--white);
  border: 1px solid var(--faint);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.day-plan-header {
  background: var(--sage-pale);
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(107, 143, 113, 0.15);
}

.day-plan-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.day-plan-totals {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.total-tag {
  font-size: 0.72rem;
  color: var(--sage);
  background: rgba(107, 143, 113, 0.1);
  border-radius: 4px;
  padding: 3px 8px;
  letter-spacing: 0.03em;
}

/* ===== MEAL ITEMS ===== */
.meal-list {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.meal-item {
  padding: 20px 24px;
  border-bottom: 1px solid var(--faint);
}

.meal-item:last-child { border-bottom: none; }

.meal-type-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--warm-tan);
  margin-bottom: 6px;
}

/* 22px+ for meal titles per design constraint */
.meal-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1.25;
  margin-bottom: 10px;
}

.meal-summary {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--mid);
  margin-bottom: 12px;
}

.meal-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.meal-stat {
  font-size: 0.72rem;
  color: var(--charcoal);
  background: var(--faint);
  border-radius: 4px;
  padding: 2px 8px;
}

.meal-flags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.meal-flag {
  font-size: 0.68rem;
  color: var(--sage);
  background: var(--sage-pale);
  border: 1px solid rgba(107, 143, 113, 0.2);
  border-radius: 3px;
  padding: 2px 7px;
  letter-spacing: 0.02em;
}

/* ===== GROCERY SECTION ===== */
.grocery-section {
  background: var(--faint);
  border-radius: 12px;
  padding: 48px clamp(24px, 4vw, 56px);
}

.grocery-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.grocery-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.btn-print {
  display: inline-block;
  background: var(--charcoal);
  color: var(--cream);
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  padding: 14px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-print:hover { background: #444; }

.grocery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 40px;
}

.grocery-aisle {
  display: flex;
  flex-direction: column;
}

.aisle-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--charcoal);
  border-bottom: 1px solid rgba(107, 143, 113, 0.2);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.aisle-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aisle-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.item-check {
  font-size: 1.1rem;
  color: var(--sage);
  flex-shrink: 0;
  margin-top: 2px;
  line-height: 1;
}

/* 18px base for grocery items — readable for caregivers */
.item-name {
  font-size: 1.0625rem;
  line-height: 1.45;
  color: var(--charcoal);
}

.grocery-footer {
  display: flex;
  justify-content: flex-start;
  padding-top: 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .planner-page { padding: 40px 20px 80px; }
  .days-grid { grid-template-columns: 1fr; }
  .plan-header { flex-direction: column; }
  .plan-actions { width: 100%; }
  .grocery-header { flex-direction: column; }
  .btn-print { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
  .planner-title { font-size: 1.75rem; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .household-options { flex-direction: column; }
  .radio-card { max-width: 100%; }
  .grocery-grid { grid-template-columns: 1fr; }
}

/* ===== SHARE SECTION ===== */
.share-section {
  margin-top: 64px;
  padding-top: 56px;
  border-top: 2px solid var(--faint);
}

.share-header {
  margin-bottom: 40px;
}

.share-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 10px;
}

.share-subtitle {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--mid);
  max-width: 600px;
}

.share-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.share-card {
  background: var(--white);
  border: 1px solid var(--faint);
  border-radius: 10px;
  padding: 32px;
}

.share-card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.share-card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.share-card-desc {
  font-size: 0.9375rem;
  color: var(--mid);
  line-height: 1.55;
  margin-bottom: 24px;
}

.share-form {
  display: flex;
  flex-direction: column;
}

.share-label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mid);
  margin-bottom: 8px;
}

.share-optional {
  text-transform: none;
  letter-spacing: 0;
  color: var(--mid);
  opacity: 0.7;
}

.share-input-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.share-input {
  font-size: 1rem;
  color: var(--charcoal);
  background: var(--cream);
  border: 1.5px solid var(--faint);
  border-radius: 4px;
  padding: 12px 16px;
  transition: border-color 0.15s ease;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.share-input:focus {
  outline: none;
  border-color: var(--sage);
}

.share-input--full {
  display: block;
}

.share-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

/* Inline send button (self form) */
.btn-share {
  flex-shrink: 0;
  background: var(--sage);
  color: var(--white);
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  font-weight: 400;
  padding: 12px 22px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.btn-share:hover { background: #5a7960; }
.btn-share:disabled { opacity: 0.6; cursor: not-allowed; }

/* Full-width send button (senior form) */
.share-btn-full {
  margin-top: 20px;
  width: 100%;
  text-align: center;
}

.share-error {
  font-size: 0.875rem;
  color: #c0392b;
  margin-top: 8px;
  line-height: 1.5;
}

.share-privacy {
  font-size: 0.8rem;
  color: var(--mid);
  line-height: 1.55;
  margin-top: 12px;
  opacity: 0.8;
}

/* Confirmation state */
.share-confirm {
  background: var(--sage-pale);
  border: 1px solid rgba(107, 143, 113, 0.3);
  border-radius: 6px;
  padding: 16px 20px;
  font-size: 1rem;
  color: var(--sage);
  line-height: 1.55;
  margin-bottom: 4px;
}

@media (max-width: 768px) {
  .share-cards { grid-template-columns: 1fr; }
  .share-input-row { flex-direction: column; }
  .btn-share { width: 100%; }
}
