/* =============================================================
   BarangayCare: resident page (step-by-step, hours, promos, ticket
   progress, feedback, footer). Uses the colors in style.css.
   ============================================================= */
:root {
  --step1: #12866F;   /* green  */
  --step2: #2B6CB0;   /* blue   */
  --step3: #F6B100;   /* gold   */
  --stage1: #F6B100;  /* in line   */
  --stage2: #E8710A;  /* almost    */
  --stage3: #12866F;  /* your turn */
  --stage4: #2B6CB0;  /* done      */
}

.brand-logo { flex: none; width: 4rem; height: 4rem; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.25); }

/* ---------- Office hours banner ---------- */
.hours-banner {
  margin-bottom: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  border-left: 8px solid var(--line);
}
.hours-banner[data-state="open"]   { border-left-color: var(--step1); }
.hours-banner[data-state="closed"] { border-left-color: var(--danger); }
.hours-status { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.25rem; font-weight: 700; }
.hours-chip { padding: 0.125rem 0.625rem; border-radius: 999px; font-size: 0.875rem; color: #fff; background: var(--muted); }
.hours-banner[data-state="open"] .hours-chip   { background: #0B6B57; }
.hours-banner[data-state="closed"] .hours-chip { background: var(--danger); }
.hours-line, .hours-detail { margin: 0; font-size: 0.9375rem; }
.hours-detail { color: var(--muted); }

/* ---------- Promos ---------- */
.promo-strip { display: grid; gap: 0.5rem; margin-bottom: 0.875rem; }
.promo { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.75rem; padding: 0.625rem 0.875rem; border-radius: var(--radius-md); background: var(--marigold-soft); border: 2px dashed var(--marigold-dark); }
.promo b { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: 0.04em; }
.promo span { font-size: 0.9375rem; }
.promo-groups { margin: 0; font-size: 0.9375rem; color: var(--ink); }

/* ---------- Color-coded progress bar ---------- */
.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.375rem; margin: 0 0 0.375rem; padding: 0; list-style: none; }
.progress-item { --c: var(--step1); display: grid; gap: 0.375rem; }
.progress-item[data-step="2"] { --c: var(--step2); }
.progress-item[data-step="3"] { --c: var(--step3); }
.progress-bar { display: block; height: 0.625rem; border-radius: 999px; background: #D5DEDB; overflow: hidden; }
.progress-item[data-state="done"] .progress-bar,
.progress-item[data-state="current"] .progress-bar { background: var(--c); }
.progress-item[data-state="current"] .progress-bar { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c); }
.progress-label { display: flex; align-items: center; gap: 0.375rem; font-size: 0.9375rem; font-weight: 700; color: var(--muted); }
.progress-item[data-state="current"] .progress-label, .progress-item[data-state="done"] .progress-label { color: var(--ink); }
.progress-label b { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #D5DEDB; color: var(--ink); font-size: 0.875rem; }
.progress-item[data-state="current"] .progress-label b { background: var(--c); color: #fff; }
.progress-item[data-step="3"][data-state="current"] .progress-label b, .progress-item[data-step="3"][data-state="done"] .progress-label b { color: var(--ink); }
.progress-item[data-state="done"] .progress-label b { background: var(--c); color: #fff; }
.progress-text { margin: 0 0 0.75rem; font-weight: 700; }

.step-num-2 { background: var(--step2); color: #fff; }
.step-num-3 { background: var(--step3); }

/* ---------- Sliding pages ---------- */
.slides-viewport { overflow: hidden; margin: -0.5rem; padding: 0.5rem; transition: height 0.3s ease; }
.slides { display: flex; align-items: flex-start; transition: transform 0.35s ease; touch-action: pan-y; }
.slide { flex: 0 0 100%; min-width: 0; }
.slide[inert] { visibility: hidden; }
.slide-nav { margin-top: 0.75rem; }
.slide-nav-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 0.625rem; }
.slide .btn { min-height: 3.5rem; font-size: 1.0625rem; }

.captain-note { margin-top: 0.75rem; padding: 0.75rem 0.875rem; border-radius: var(--radius-md); background: #E8F0FA; border-left: 4px solid var(--step2); }
.captain-note-title { margin: 0 0 0.25rem; font-weight: 700; }
.captain-note p:last-child { margin: 0; font-size: 0.9375rem; }
.captain-note-inline { margin: 0.5rem 0; padding: 0.625rem 0.75rem; border-radius: var(--radius-md); background: #E8F0FA; text-align: left; font-size: 0.9375rem; }

/* ---------- When: today or later ---------- */
.when-card { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.875rem; margin-bottom: 0.625rem; border: 2px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); cursor: pointer; }
.when-card input { margin-top: 0.3rem; width: 1.25rem; height: 1.25rem; accent-color: var(--primary); flex: none; }
.when-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.when-card.is-disabled { opacity: 0.7; cursor: not-allowed; background: #EEF1F0; }
.when-text b { display: block; }
.when-text small { display: block; margin-top: 0.125rem; color: var(--muted); font-size: 0.9375rem; }
.later-box { margin-top: 0.875rem; padding-top: 0.875rem; border-top: 2px dashed var(--line); }
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.slot { min-height: 2.75rem; border: 2px solid var(--primary); border-radius: var(--radius-md); background: #fff; color: var(--primary); font: inherit; font-weight: 700; cursor: pointer; }
.slot[aria-checked="true"] { background: var(--primary); color: #fff; }
.slot:disabled { border-color: var(--line); color: var(--muted); background: #EEF1F0; cursor: not-allowed; text-decoration: line-through; }
.slot-hint { margin: 0.625rem 0 0; color: var(--muted); font-size: 0.9375rem; }

/* ---------- Details and price ---------- */
.choice-summary { margin: 0 0 1rem; padding: 0.625rem 0.875rem; border-radius: var(--radius-md); background: var(--primary-soft); font-weight: 700; }
.field select { width: 100%; }
.coupon-row { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; }
.coupon-row input { text-transform: uppercase; }
.coupon-row .btn { min-height: 3.25rem; }
.price-box { margin: 0 0 1rem; padding: 0.875rem; border-radius: var(--radius-md); background: var(--marigold-soft); border: 2px solid var(--marigold); }
.price-title { margin: 0 0 0.5rem; font-weight: 700; }
.price-rows { margin: 0; }
.price-rows div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.25rem 0; }
.price-rows dt, .price-rows dd { margin: 0; }
.price-total { margin-top: 0.25rem; padding-top: 0.5rem !important; border-top: 2px solid var(--marigold-dark); font-weight: 700; font-size: 1.25rem; }
.price-note { margin: 0.5rem 0 0; font-size: 0.9375rem; }

/* ---------- Ticket progress (color-coded, updates by itself) ---------- */
.track { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 1rem; padding: 0; list-style: none; position: relative; }
.track-item { --c: var(--stage1); position: relative; display: grid; justify-items: center; gap: 0.375rem; text-align: center; }
.track-item[data-stage="2"] { --c: var(--stage2); }
.track-item[data-stage="3"] { --c: var(--stage3); }
.track-item[data-stage="4"] { --c: var(--stage4); }
.track-item:not(:first-child)::before { content: ""; position: absolute; top: 0.8125rem; right: 50%; width: 100%; height: 0.375rem; background: #D5DEDB; z-index: 0; }
.track-item[data-state="done"]:not(:first-child)::before, .track-item[data-state="current"]:not(:first-child)::before { background: var(--c); }
.track-dot { position: relative; z-index: 1; width: 2rem; height: 2rem; border-radius: 50%; background: #D5DEDB; display: grid; place-items: center; font-weight: 800; color: #fff; }
.track-item[data-state="done"] .track-dot { background: var(--c); }
.track-item[data-state="done"] .track-dot::after { content: "\2713"; }
.track-item[data-state="current"] .track-dot { background: var(--c); box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--c); }
.track-item[data-state="current"] .track-dot::after { content: "\25CF"; font-size: 0.75rem; }
.track-label { font-size: 0.875rem; font-weight: 700; color: var(--muted); }
.track-item[data-state="current"] .track-label, .track-item[data-state="done"] .track-label { color: var(--ink); }
.track[data-missed="true"] .track-item[data-stage="3"] .track-label::after { content: " (missed)"; color: var(--danger); }

.ticket-fee { margin: 0.75rem 0 0; padding: 0.5rem 0.75rem; border-radius: var(--radius-md); background: #fff; color: var(--ink); font-weight: 700; text-align: left; }
.ticket-fee[hidden] { display: none; }

/* ---------- Feedback (always visible) ---------- */
.feedback-card { margin-top: 1.25rem; padding: 1.25rem; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-1); text-align: center; }
.feedback-title { margin: 0 0 0.25rem; font-size: 1.25rem; }
.feedback-title .tl { display: block; font-weight: 400; }
.feedback-summary { margin: 0 0 0.75rem; color: var(--muted); font-weight: 700; }
.feedback-summary .big { color: var(--ink); font-family: var(--font-display); font-size: 2rem; }
.feedback-card .field { text-align: left; }
.feedback-card .privacy { margin-top: 0.75rem; text-align: left; }

/* ---------- Footer with barangay details ---------- */
.site-footer-rich { margin-top: 2rem; padding: 2rem 0 7rem; background: var(--ink); color: #FFFFFF; font-size: 0.9375rem; }
.site-footer-rich .wrap { max-width: 60rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem; }
.footer-brand { display: flex; align-items: center; gap: 0.875rem; }
.footer-brand img { width: 5rem; height: 5rem; border-radius: 50%; background: #fff; flex: none; }
.footer-name { font-family: var(--font-display); font-weight: 800; font-size: 1.75rem; line-height: 1; margin-bottom: 0.25rem !important; }
.footer-head { margin: 0 0 0.375rem !important; color: var(--marigold); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8125rem; }
.site-footer-rich p { margin: 0 0 0.25rem; }
.site-footer-rich .muted { color: rgba(255, 255, 255, 0.78); }
.footer-fine { margin-top: 0.375rem !important; color: rgba(255, 255, 255, 0.7); font-size: 0.8125rem; }
.footer-list { margin: 0; padding: 0; list-style: none; }
.footer-list li { margin-bottom: 0.25rem; word-break: break-word; }
.site-footer-rich a { color: #FFFFFF; }
.footer-bottom { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.7); font-size: 0.8125rem; }
