/* StanMowing public availability calendar */

.schedule-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.schedule-hero {
  text-align: center;
  margin-bottom: 1.6rem;
}
.schedule-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: var(--green-pale);
  border: 1px solid var(--green-mid);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.schedule-eyebrow i { width: 14px; height: 14px; }
.schedule-hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
  font-weight: 700;
}
.schedule-tagline {
  color: var(--muted);
  margin: 0 auto 0.9rem;
  max-width: 560px;
  font-size: 1rem;
}

.schedule-legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.leg-pill {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid;
}
.leg-pill.open { background: var(--green-pale); color: var(--green-dark); border-color: var(--green-mid); }
.leg-pill.partial { background: #fef7ea; color: #8a6e1f; border-color: #f1e1bb; }
.leg-pill.full { background: #f3f2ef; color: #5a5a54; border-color: #e4e2dc; }
.leg-pill.absent { background: #fdeee5; color: #a35c2c; border-color: #f3d9bf; }

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  margin: 1.4rem 0;
}
.schedule-loading {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  grid-column: 1 / -1;
}

.day-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
}
.day-card.today {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(74,124,47,0.12);
}

/* Clickable cards (signed-in customers on open/partial days) */
button.day-card {
  cursor: pointer;
}
button.day-card.clickable:hover,
button.day-card.clickable:focus-visible {
  border-color: var(--green);
  box-shadow: 0 4px 14px rgba(74,124,47,0.18);
  transform: translateY(-1px);
  outline: none;
}
button.day-card.clickable:focus-visible {
  box-shadow: 0 0 0 3px rgba(74,124,47,0.35);
}
button.day-card.clickable:active {
  transform: translateY(0);
}
.day-card-head {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.55rem;
}
.day-weekday {
  grid-column: 1 / -1;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.day-num {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}
.day-month {
  align-self: end;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 0.18rem;
}
.day-status { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; }
.day-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.day-pill.open { background: var(--green-pale); color: var(--green-dark); border: 1px solid var(--green-mid); }
.day-pill.partial { background: #fef7ea; color: #8a6e1f; border: 1px solid #f1e1bb; }
.day-pill.full { background: #f3f2ef; color: #5a5a54; border: 1px solid #e4e2dc; }
.day-pill.absent {
  background: #fdeee5;
  color: #a35c2c;
  border: 1px solid #f3d9bf;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  white-space: normal;
}

/* Status hue on the whole card (subtle) */
.day-card.status-full { background: #faf9f7; }
.day-card.status-absent { background: #fdfaf6; }

/* School-mode tag: blue, sits below the status pill on weekdays in
   academic months. Doesn't show when the day is fully absent or full. */
.day-school-tag {
  margin-top: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #2c5d8a;
  background: #d8e7ff;
  border: 1px solid #b9cde9;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
  align-self: flex-start;
}

.schedule-tipjar {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--green-pale);
  border: 1px solid var(--green-mid);
  border-radius: 14px;
  padding: 1.15rem 1.2rem;
  margin: 1.6rem 0 1.2rem;
}
.tipjar-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--green-mid);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tipjar-icon i { width: 24px; height: 24px; color: var(--green); }
.tipjar-body h2 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--green-dark);
}
.tipjar-body p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.tipjar-body a { font-weight: 600; }

.schedule-cta {
  text-align: center;
  margin-top: 2rem;
  padding: 2rem 1rem;
  background: var(--bg2);
  border-radius: 16px;
  border: 1px solid var(--border);
}
.schedule-cta h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}
.schedule-cta .btn-primary { margin-top: 0.6rem; }

/* Toast above the grid for booking success/failure */
.schedule-toast {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  text-align: center;
  border: 1px solid;
}
.schedule-toast.ok {
  background: var(--green-pale);
  color: var(--green-dark);
  border-color: var(--green-mid);
}
.schedule-toast.error {
  background: #fdeaea;
  color: #8a2929;
  border-color: #f1c5c5;
}

/* Booking confirm panel (slides in below the grid when a day is clicked) */
.book-confirm {
  margin: 1.4rem 0 0;
  padding: 1.2rem 1.3rem 1.3rem;
  background: white;
  border: 1px solid var(--green-mid);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(74,124,47,0.10);
}
/* Catch-all: every section inside the booking panel respects [hidden].
   Without this, the per-section display:flex/grid rules below win on
   specificity and the section stays visible regardless of mode. */
.book-confirm [hidden],
.book-confirm-newform [hidden] {
  display: none !important;
}
.book-confirm-title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--green-dark);
}
.book-confirm-hint {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
/* Anonymous booking form — shown above the time row when mode='anonymous' */
.book-confirm-newform {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}
.book-confirm-newform .bc-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.book-confirm-newform label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
.bc-optional {
  font-weight: 400;
  color: var(--muted);
}
.bc-input {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text);
  min-height: 44px;
}
.bc-input:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: var(--green);
}
textarea.bc-input {
  resize: vertical;
  min-height: 60px;
}

/* Inline "Get my price" button alongside address input */
.bc-quote-btn {
  font: inherit;
  background: var(--green-pale);
  color: var(--green-dark);
  border: 1px solid var(--green-mid);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  align-self: flex-start;
  margin-top: 0.35rem;
}
.bc-quote-btn:hover { background: white; border-color: var(--green); }
.bc-quote-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.bc-quote-status {
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--bg2);
  color: var(--muted);
}
.bc-quote-status.error {
  background: #fdeaea;
  color: #8a2929;
  border: 1px solid #f1c5c5;
}

/* Quote + frequency + pay panel (shows after /api/quote succeeds) */
.bc-quote-panel {
  background: var(--green-pale);
  border: 1px solid var(--green-mid);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.bc-quote-line {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.bc-quote-yard { color: var(--muted); font-size: 0.9rem; }
.bc-quote-permow { font-weight: 700; color: var(--green-dark); }
.bc-quote-section-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.bc-freq-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.bc-freq-chip {
  font: inherit;
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.bc-freq-chip:hover { border-color: var(--green-mid); }
.bc-freq-chip.active {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.bc-edges-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}
.bc-edges-row input { width: 18px; height: 18px; }
.bc-quote-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 0.5rem;
  border-top: 1px solid var(--green-mid);
}
.bc-quote-total-label { color: var(--muted); font-size: 0.9rem; }
.bc-quote-total-amount {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--green-dark);
}
.bc-quote-fineprint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Lead-capture fallback (collapsed by default) */
.bc-fallback {
  margin-top: 0.5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
}
.bc-fallback summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
  padding: 0.2rem 0;
  list-style: none;
}
.bc-fallback summary::-webkit-details-marker { display: none; }
.bc-fallback summary::before {
  content: '▸ ';
  color: var(--muted);
}
.bc-fallback[open] summary::before { content: '▾ '; }
.bc-fallback > .bc-row { margin-top: 0.6rem; }
.bc-fallback > button { margin-top: 0.5rem; }

/* Founder customer picker — shown above the time row when mode='founder' */
.book-confirm-picker {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}
.book-confirm-picker-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
.book-confirm-customer-select {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text);
  min-height: 44px;
}
.book-confirm-customer-select:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: var(--green);
}

.book-confirm-time {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}
.book-confirm-time-label {
  color: var(--muted);
  font-size: 0.88rem;
  margin-right: 0.25rem;
}
.time-chip {
  font: inherit;
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.time-chip:hover { border-color: var(--green-mid); }
.time-chip.active {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.book-confirm-msg {
  margin: 0 0 0.8rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  border: 1px solid transparent;
}
.book-confirm-msg.error {
  background: #fdeaea;
  color: #8a2929;
  border-color: #f1c5c5;
}
.book-confirm-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.book-confirm-actions .btn-primary:not([hidden]),
.book-confirm-actions .btn-secondary:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.book-confirm-actions .btn-primary[hidden],
.book-confirm-actions .btn-secondary[hidden] {
  display: none;
}
.book-confirm-actions .btn-primary i {
  width: 16px;
  height: 16px;
}

@media (max-width: 600px) {
  .schedule-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.5rem; }
  .day-card { padding: 0.7rem; }
  .day-num { font-size: 1.55rem; }
  .schedule-tipjar { flex-direction: column; }
  .tipjar-icon { width: 40px; height: 40px; }
  .book-confirm-actions { justify-content: stretch; }
  .book-confirm-actions .btn-primary:not([hidden]),
  .book-confirm-actions .btn-secondary:not([hidden]) { flex: 1 1 auto; justify-content: center; }
}
