/* style.css — shared styles for the Animal Assisted Happiness signup app. */

/* Google Font — matches AAH's rounded, friendly-professional brand typography. */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

/* ── AAH brand palette (sampled directly from animalassistedhappiness.org) ──
   Primary: a muted blue-purple (#5f599c) seen in their wordmark.
   All "green/cream" references throughout this file now resolve to these
   purple/clean values — so admin, buttons, and inputs update automatically. */
:root {
  /* Core AAH colours */
  --purple:       #6644c2;   /* brand primary — sampled from AAH heart logo  */
  --purple-dark:  #4f30a0;   /* hover / active states                        */
  --purple-soft:  #eeedf8;   /* pale fill — chips, tags, soft backgrounds    */
  --purple-xsoft: #f6f5fc;   /* very pale — page background tint             */

  /* Semantic surface colours */
  --bg:    #f7f7fc;          /* page background (near-white, purple-tinted)  */
  --card:  #ffffff;          /* card / panel surfaces                        */
  --ink:   #1c1b2e;          /* primary text (near-black, purple undertone)  */
  --muted: #6e6e94;          /* secondary text / labels                      */
  --border: #e3e2ef;         /* dividers and card outlines                   */
  --shadow:       0 2px 12px rgba(30, 25, 80, 0.07);
  --shadow-hover: 0 6px 22px rgba(30, 25, 80, 0.13);

  /* Aliases so every existing rule that says --green / --cream still works */
  --cream:      var(--bg);
  --green:      var(--purple);
  --green-dark: var(--purple-dark);
  --green-soft: var(--purple-soft);

  /* Functional accent colours (kept for error states / full-shift badges) */
  --sun:        #f5a623;
  --coral:      #d94f38;
  --coral-soft: #fde8e3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Header ---- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
/* On the volunteer page the header floats over the rooms with a frosted look. */
.site-header.floating {
  position: fixed;
  left: 0;
  right: 0;
  background: rgba(255, 248, 239, 0.72);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(239, 226, 210, 0.7);
  z-index: 40;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.15rem;
}
.brand-mark {
  font-size: 1.5rem;
  background: var(--green-soft);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.link {
  color: var(--green-dark);
  text-decoration: none;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--green-soft);
}
.link:hover {
  background: #d9eee1;
}

/* ---- Hero banner: warm background, text on the left, real photo on the right ---- */
.hero {
  padding: 40px 0;
  background: radial-gradient(1000px 320px at 12% -30%, #fde8c8 0%, transparent 60%),
    linear-gradient(180deg, #fffdf8 0%, var(--cream) 100%);
  border-bottom: 1px solid var(--border);
}
.hero-content {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 30px;
  align-items: center;
}
.hero-eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--green-dark);
}
.hero-title {
  margin: 0 0 10px;
  font-size: 2.5rem;
  letter-spacing: -0.5px;
}
.hero-tagline {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: var(--ink);
}
.hero-tagline strong {
  color: var(--green-dark);
}
.hero-sub {
  margin: 0;
  font-size: 1.02rem;
  color: var(--muted);
}
/* A small tribute to the girl whose story started the org */
.hero-tribute {
  display: flex;
  gap: 9px;
  align-items: baseline;
  margin: 18px 0 0;
  padding: 11px 15px;
  max-width: 560px;
  background: var(--green-soft);
  border-left: 4px solid var(--green);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  font-size: 0.97rem;
  color: var(--green-dark);
}
.tribute-mark {
  font-style: normal;
  font-size: 1.1rem;
}
/* The real AAH photo, shown cleanly in a rounded frame */
.hero-photo {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center 35%;
  border-radius: 18px;
  border: 5px solid #fff;
  box-shadow: var(--shadow);
}

@media (max-width: 720px) {
  .hero-content {
    grid-template-columns: 1fr;
  }
  .hero-photo {
    height: 200px;
    order: -1; /* show the photo above the text on small screens */
  }
}

/* ---- Shift cards grid (volunteer page) ---- */
.shift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 28px 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.shift-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.shift-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.shift-card.is-full {
  opacity: 0.92;
}

.shift-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--green-soft);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.shift-card.is-full .shift-icon {
  background: var(--coral-soft);
}

.shift-card h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  line-height: 1.3;
}
.shift-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 8px;
}

/* Clickable address that opens Google Maps */
.shift-loc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: var(--green-dark);
  text-decoration: none;
  font-weight: 600;
}
.shift-loc:hover {
  text-decoration: underline;
}

/* The little row of dots showing filled vs open spots */
.pips {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.pip {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ece0d0; /* empty spot */
}
.pip.filled {
  background: var(--green); /* a taken spot */
}
.shift-card.is-full .pip.filled {
  background: var(--coral);
}

.spots {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 4px 0 16px;
}
.spots.open {
  color: var(--green-dark);
}
.spots.full {
  color: var(--coral);
}

/* push the button to the bottom so cards of different heights line up */
.shift-card .btn {
  margin-top: auto;
}

/* ---- Buttons ---- */
.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary {
  background: var(--green);
  color: #fff;
}
.btn-primary:hover {
  background: var(--green-dark);
}
.btn-primary:disabled {
  background: #cfc4b6;
  cursor: not-allowed;
}
.btn-secondary {
  background: #efe7db;
  color: var(--ink);
}
.btn-secondary:hover {
  background: #e6dccd;
}
.btn-danger {
  background: var(--coral);
  color: #fff;
}
.btn-danger:hover {
  background: #c84a32;
}
.btn-full {
  width: 100%;
}

/* ---- Signup popup (the <dialog> element) ---- */
dialog {
  border: none;
  border-radius: 18px;
  padding: 0;
  max-width: 400px;
  width: 92%;
  box-shadow: 0 20px 50px rgba(60, 40, 20, 0.3);
}
dialog::backdrop {
  background: rgba(44, 37, 33, 0.45);
}
#signup-form {
  padding: 24px;
}
#signup-form h2 {
  margin: 0 0 4px;
}
.dialog-sub {
  margin: 0 0 8px;
  color: var(--muted);
}

/* ---- Form fields ---- */
label {
  display: block;
  margin: 14px 0;
  font-weight: 700;
  font-size: 0.95rem;
}
input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  font-size: 1rem;
  font-weight: 400;
  font-family: inherit;
  background: #fffdfa;
}
input:focus {
  outline: 2px solid var(--green);
  border-color: var(--green);
}

.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.form-error {
  color: var(--coral);
  font-weight: 700;
  min-height: 1.2em;
  margin: 8px 0 0;
}

.form-success {
  color: #2a7a3b;
  background: #e8f5eb;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
  margin: 8px 0 0;
}

.status {
  color: var(--muted);
  text-align: center;
  padding: 30px;
  font-size: 1.05rem;
}

/* ---- Footer ---- */
.privacy-card {
  max-width: 680px;
  margin: 48px auto;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 36px 40px;
}
.privacy-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 16px;
}
.privacy-card p {
  color: var(--ink);
  line-height: 1.7;
  margin: 0;
}

.site-footer {
  margin-top: 30px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
}

.cancel-link {
  color: var(--muted);
  text-decoration: underline;
  font-size: 0.9rem;
}
.cancel-link:hover {
  color: var(--purple);
}

.cancel-inline-link {
  color: var(--purple);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.cancel-inline-link:hover {
  text-decoration: underline;
}

/* ---- Cancel page ---- */
.cancel-page {
  max-width: 500px;
  margin: 40px auto;
}

.cancel-form {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
}

.cancel-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.cancel-form input {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  transition: border-color 0.15s;
}

.cancel-form input:focus,
.cancel-form select:focus {
  outline: none;
  border-color: var(--purple);
}

.cancel-form select {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236e6e94' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
  transition: border-color 0.15s;
}

/* ── Cancel page — signup cards ──────────────────────────────────────────── */
.cancel-signup-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 12px;
}

.cancel-signup-info {
  flex: 1;
  min-width: 0;
}

.cancel-signup-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cancel-signup-when {
  font-size: 0.875rem;
  color: var(--ink-soft, #555);
  margin: 0;
}

.cancel-notify-btn {
  margin-top: 10px;
  font-size: 0.82rem;
  padding: 6px 12px;
  display: inline-block;
  text-decoration: none;
}

.cancel-signup-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Danger button ───────────────────────────────────────────────────────── */
.btn-danger {
  background: #dc2626;
  color: #fff;
  border: none;
}
.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}

/* ── Confirmation dialog ─────────────────────────────────────────────────── */
.cancel-confirm-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: 400px;
  width: calc(100% - 32px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.cancel-confirm-dialog::backdrop {
  background: rgba(0,0,0,0.45);
}
.cancel-confirm-inner {
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cancel-confirm-msg {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1.4;
}
.cancel-confirm-warn {
  font-size: 0.875rem;
  color: #b45309;
  margin: 0;
}
.cancel-confirm-btns {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.cancel-confirm-btns .btn {
  flex: 1;
}

/* ---- Admin auth gate ---- */
.auth-gate-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 71px);
  padding: 32px 20px;
}
.auth-gate {
  width: 100%;
  max-width: 380px;
  padding: 36px 32px;
  text-align: center;
}
.auth-gate-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}
.auth-gate-title {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 800;
}
.auth-gate-sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.95rem;
}
.auth-gate-form {
  text-align: left;
}
.auth-gate-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 0.9rem;
}
.auth-gate-btn {
  margin-top: 18px;
  border-radius: 12px;
}

/* Admin topbar: title/sub on the left, sign-out button on the right */
.admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-logout {
  flex-shrink: 0;
  margin-top: 28px;
  font-size: 0.88rem;
  padding: 8px 16px;
}

/* ---- Admin page ---- */
.page-title {
  margin: 28px 0 6px;
}
.page-sub {
  margin: 0 0 18px;
  color: var(--muted);
}
.add-shift {
  padding: 22px;
  margin-bottom: 28px;
}
.add-shift h2 {
  margin-top: 0;
}
.add-shift-form .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
}

.admin-shift {
  padding: 18px;
  margin-bottom: 16px;
}
.admin-shift-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.admin-shift-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-shift-title .shift-icon {
  margin-bottom: 0;
  width: 46px;
  height: 46px;
  font-size: 1.6rem;
}
.admin-shift h3 {
  margin: 0 0 2px;
  font-size: 1.1rem;
}
.signup-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.signup-list li {
  background: var(--green-soft);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.95rem;
}
.signup-list li span {
  color: var(--muted);
}
.no-signups {
  color: var(--muted);
  font-style: italic;
  margin: 14px 0 0;
}

/* Full-width notice used when the page is opened the wrong way (file://) */
.setup-notice {
  max-width: 540px;
  margin: 60px auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px;
  text-align: center;
}
.setup-notice code {
  background: var(--green-soft);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.95em;
}

@media (max-width: 520px) {
  .hero-title {
    font-size: 1.9rem;
  }
}

/* =====================================================================
   MODERN SCROLLING "ROOMS" EXPERIENCE (volunteer page only)
   Each shift becomes a full-screen room you scroll through. The styles
   below only apply on <body class="volunteer">, so the admin page keeps
   its simple card layout untouched.
   ===================================================================== */

/* (The previous full-screen "rooms" experience was replaced by the compact
   dashboard below. Its leftover .room* rules are unused now and harmless.) */

/* A bigger, pill-shaped button used for the main calls to action. */
.btn-lg {
  padding: 15px 28px;
  font-size: 1.05rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  text-decoration: none;
  display: inline-block;
}
.btn-lg:hover {
  box-shadow: var(--shadow-hover);
}

/* The scroll container: full height, snaps gently from room to room. */
.rooms {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}
/* Hide the scrollbar for a cleaner look (still scrollable). */
.rooms::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.rooms {
  scrollbar-width: none;
}

/* A single full-screen room. */
.room {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  scroll-snap-align: start;
  overflow: hidden;
}

/* Each room's soft, brand-colored background wash sits behind the text. */
.room-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.room-bg-intro {
  background: radial-gradient(1100px 520px at 78% -10%, #fde8c8 0%, transparent 55%),
    radial-gradient(900px 600px at 10% 110%, var(--green-soft) 0%, transparent 60%),
    linear-gradient(180deg, #fffdf8 0%, var(--cream) 100%);
}
.room-bg-shift {
  background: linear-gradient(165deg, #fffdf8 0%, var(--cream) 60%, #fdf3e4 100%);
}
.room-alt .room-bg-shift {
  background: linear-gradient(165deg, var(--green-soft) 0%, #f1faf4 55%, var(--cream) 100%);
}
.room.is-full .room-bg-shift {
  background: linear-gradient(165deg, #fff5f2 0%, var(--coral-soft) 70%, var(--cream) 100%);
}
.room-bg-closing {
  background: radial-gradient(900px 500px at 50% -10%, #fde8c8 0%, transparent 55%),
    linear-gradient(180deg, var(--green) 0%, var(--green-dark) 100%);
}

/* The readable content sits above the background. */
.room-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 90px;
  padding-bottom: 60px;
}

/* A giant ghosted emoji that gives each shift room its character. */
.room-watermark {
  position: absolute;
  z-index: 1;
  right: -2%;
  bottom: -8%;
  font-size: 40vh;
  line-height: 1;
  opacity: 0.12;
  filter: saturate(1.1);
  pointer-events: none;
  user-select: none;
}
.room-alt .room-watermark {
  right: auto;
  left: -3%;
}

/* Shared little eyebrow label (masthead, etc.) */
.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--purple);
  opacity: 0.7;
}
.room.is-full .eyebrow {
  color: var(--coral);
}

/* ---- Intro room ---- */
.intro-inner {
  max-width: 760px;
}
.intro-title {
  margin: 0 0 18px;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -1.5px;
  font-weight: 800;
}
.intro-title .accent {
  color: var(--green);
}
.intro-tagline {
  margin: 0 0 18px;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  max-width: 640px;
  color: var(--ink);
}
.intro-tribute {
  margin: 0 0 28px;
  padding: 12px 18px;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.55);
  border-left: 4px solid var(--green);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  font-size: 1rem;
  color: var(--green-dark);
}

/* The little bouncing scroll hint at the bottom of the intro. */
.scroll-cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--green);
  border-radius: 999px;
  display: grid;
  place-items: start center;
  padding-top: 7px;
}
.scroll-cue-dot {
  width: 5px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  animation: scroll-bob 1.5s ease-in-out infinite;
}
@keyframes scroll-bob {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0.3; }
}

/* ---- Shift rooms ---- */
.shift-inner {
  max-width: 720px;
}
.shift-title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -1px;
  font-weight: 800;
}
.shift-title-icon {
  display: inline-block;
  margin-right: 14px;
  font-size: 0.9em;
}
.shift-when {
  margin: 0 0 10px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 600;
  color: var(--ink);
}
/* .shift-loc is shared with the admin page (defined earlier); on a room we
   just want it a touch larger and roomier. */
.room .shift-loc {
  font-size: 1.02rem;
  margin: 0 0 26px;
}

/* The spots meter: a filled track + a friendly count. */
.spots-meter {
  max-width: 440px;
  margin: 0 0 28px;
}
.meter-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--green);
  transition: width 0.6s ease;
}
.room.is-full .meter-fill {
  background: var(--coral);
}
.spots-label {
  margin: 10px 0 0;
  font-weight: 700;
  font-size: 1rem;
}
.spots-label.open {
  color: var(--green-dark);
}
.spots-label.full {
  color: var(--coral);
}

/* ---- Closing room ---- */
.closing-inner {
  max-width: 640px;
  text-align: center;
  margin: 0 auto;
  color: #fff;
}
.closing-mark {
  font-size: 3rem;
  display: block;
  margin-bottom: 10px;
}
.closing-title {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  letter-spacing: -0.5px;
}
.closing-sub {
  margin: 0 0 26px;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
}
.closing-inner .btn-secondary {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.closing-inner .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.26);
}
.closing-foot {
  margin: 28px 0 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}

/* The status line, centered within the scroll flow. */
.volunteer #status:not(:empty) {
  min-height: 60vh;
  display: grid;
  place-items: center;
  scroll-snap-align: start;
}

/* ---- Thin scroll-progress bar across the very top ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, var(--green), var(--sun));
  z-index: 50;
  transition: width 0.1s linear;
}

/* ---- Floating dot navigation down the right side ---- */
.room-nav {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-end;
}
.room-dot {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(99, 70, 40, 0.25);
  transition: transform 0.2s ease, background 0.2s ease;
}
.room-dot:hover {
  transform: scale(1.25);
  background: var(--green);
}
.room-dot.active {
  background: var(--green);
  transform: scale(1.35);
  box-shadow: 0 0 0 4px rgba(47, 143, 91, 0.18);
}
/* Show the room's name when you hover its dot. */
.room-dot-label {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  white-space: nowrap;
  background: var(--ink);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-dot:hover .room-dot-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* On small screens, hide the side dots and let everything breathe. */
@media (max-width: 720px) {
  .room-nav {
    display: none;
  }
  .room-watermark {
    font-size: 30vh;
    opacity: 0.1;
  }
  .room-inner {
    padding-top: 80px;
  }
}

/* Respect users who prefer less motion. */
@media (prefers-reduced-motion: reduce) {
  .rooms {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }
  .scroll-cue-dot {
    animation: none;
  }
}

/* =====================================================================
   COMPACT DASHBOARD — volunteer page (body.volunteer)
   AAH brand palette: purple #5f599c, white backgrounds, Nunito font.
   Scoped to body.volunteer so admin keeps its own clean look.
   ===================================================================== */

/* Keep the header sticky on the dashboard (normal flow, not floating). */
.volunteer .site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}

/* ── AAH logo image ──────────────────────────────────────────────────────
   The real AAH heart logo (purple heart + AAH lettering + silhouettes).
   File lives at:  public/images/aah-logo.png
   ─────────────────────────────────────────────────────────────────────── */
.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Brand text in the header — AAH's purple, Nunito weight 800 */
.brand-text {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 800;
  color: var(--purple);
  font-size: 1.1rem;
}

/* ---- Masthead: page title + open-visits counter ---- */
.masthead {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 28px 0 22px;
}
.masthead-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.masthead-title {
  margin: 6px 0 8px;
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.5px;
  font-weight: 800;
}
.masthead-sub {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
  font-size: 0.98rem;
}
/* Live "visits open" counter, top-right of masthead. */
.masthead-stat {
  text-align: center;
  background: var(--purple-soft);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 20px;
  flex-shrink: 0;
}
.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--purple);
  line-height: 1;
  font-family: 'Nunito', system-ui, sans-serif;
}
.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.75;
}

/* ─── Sticky filter bar ──────────────────────────────────────────────────── */
/* Sits just below the sticky header. Contains date segments + type chips. */
.filter-bar {
  position: sticky;
  top: 71px;             /* header height ≈ 71px */
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.filter-bar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Date segment group */
.seg-group {
  display: inline-flex;
  background: #f3f2f9;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}
.seg {
  border: none;
  background: transparent;
  padding: 7px 14px;
  border-radius: 7px;
  font: inherit;
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}
.seg:hover:not(.active) {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}
.seg.active {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 1px 4px rgba(95, 89, 156, 0.3);
}

/* Staff announcement banner (message sheet A2/B2) */
.site-banner {
  margin: 16px 0 0;
  padding: 13px 18px;
  background: #fff8e6;
  border: 1.5px solid #f0dc9a;
  border-radius: 12px;
  color: #6b5416;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.site-banner::before {
  content: '📣 ';
}

/* Type chips row — scrolls if overflow on narrow screens */
.chip-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  flex: 1;
}

/* Staff page: many name chips — stack the bar so chips get the full width
   instead of wrapping in the leftover space beside the date buttons. */
.staff-page .filter-bar-inner {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.staff-page .chip-row { flex: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1.5px solid var(--border);
  background: #ffffff;
  color: var(--ink);
  padding: 5px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease,
              box-shadow 0.12s ease;
  white-space: nowrap;
}
.chip:hover {
  border-color: var(--purple);
  color: var(--purple);
}
.chip.active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
  box-shadow: 0 1px 6px rgba(95, 89, 156, 0.28);
}
.chip-count {
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--purple);
  background: var(--purple-soft);
  padding: 1px 6px;
  border-radius: 999px;
  transition: background 0.12s ease, color 0.12s ease;
  line-height: 1.5;
}
.chip.active .chip-count {
  background: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.9);
}

/* ─── Results bar ────────────────────────────────────────────────────────── */
.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0 10px;
}
.results-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.1px;
}
.clear-btn {
  border: none;
  background: none;
  color: var(--purple);
  font: inherit;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  padding: 4px 0;
  opacity: 0.85;
}
.clear-btn:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ─── Shift card grid ────────────────────────────────────────────────────── */
.shift-grid-compact {
  display: grid;
  /* min(270px, 100%) keeps the column from ever exceeding the screen width */
  grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr));
  gap: 14px;
  margin-bottom: 48px;
}

.scard {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px 17px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* min-width:0 lets the card shrink to its column. Without it, a card with a
     long no-wrap location would stretch the whole column past the screen. */
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.scard:hover {
  border-color: var(--purple);
  box-shadow: 0 4px 18px rgba(95, 89, 156, 0.11);
  transform: translateY(-2px);
}
.scard.is-full {
  opacity: 0.55;
}
.scard.is-full:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

/* Top row: activity type on left, spots status on right */
.scard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.type-tag {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--purple);
  background: var(--purple-soft);
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
}
.spots-pill {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--purple-dark);
  white-space: nowrap;
}
.spots-pill.low  { color: #b97a0a; }  /* amber warning */
.spots-pill.full { color: var(--muted); }

/* Title */
.scard-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.15px;
  color: var(--ink);
}

/* Date · time */
.scard-when {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
}
.when-date { font-weight: 800; color: var(--ink); }
.when-sep  { color: var(--muted); }
.when-time { color: var(--muted); font-weight: 600; }

/* Location */
.scard-loc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.12s ease;
}
.scard-loc:hover {
  color: var(--purple);
  text-decoration: underline;
}

/* Description text (volunteer-facing) */
.scard-desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  padding: 8px 10px;
  background: var(--purple-xsoft);
  border-radius: 7px;
  white-space: pre-wrap;
}

.scard-desc-toggle {
  margin-top: 4px;
  background: none;
  border: none;
  padding: 0;
  color: var(--purple);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.scard-desc-toggle:hover { opacity: 0.75; }

/* Staff-only description block */
.scard-desc-staff {
  background: #fffbf0;
  border-left: 3px solid var(--sun);
  padding: 8px 10px;
  border-radius: 0 7px 7px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.staff-badge {
  display: inline-block;
  font-size: 0.63rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #7a5200;
  background: #fde68a;
  padding: 2px 7px;
  border-radius: 4px;
  align-self: flex-start;
}
.scard-desc-text {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ── Staff page: signup list ─────────────────────────────────────────────── */
.scard-signups {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f4f4f8;
  border-radius: 8px;
  font-size: 0.82rem;
}

.scard-signups-heading {
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scard-signups-empty {
  margin: 0;
  color: var(--muted);
}

.scard-signups-list {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scard-signups-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.signup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
}

.signup-name {
  font-weight: 500;
  color: var(--ink);
}

.signup-email {
  color: var(--purple);
  font-size: 0.78rem;
}

.signup-unregistered {
  font-size: 0.75rem;
  color: #b45309;
  font-weight: 500;
  padding-left: 2px;
}

.ya-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #7c3aed;
  background: #ede9fe;
  padding: 1px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.signup-hours {
  font-size: 0.75rem;
  color: var(--ink-soft, #555);
  padding-left: 2px;
  margin-top: 2px;
}

/* Attendance badges on staff page */
.att-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.att-attended { background: #dcfce7; color: #166534; }
.att-noshow   { background: #fee2e2; color: #991b1b; }
.att-upcoming { background: #f1f5f9; color: #64748b; }

/* ── Check-in page ────────────────────────────────────────────────────────── */
.checkin-page {
  max-width: 480px;
  margin: 40px auto;
  padding: 0 16px;
}

.checkin-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
}

.checkin-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
  color: var(--ink);
}

.checkin-shift-card {
  padding: 16px 20px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checkin-shift-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  margin: 0;
}

.checkin-shift-time {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

.checkin-already {
  font-size: 0.88rem;
  color: #166534;
  font-weight: 500;
  margin: 0;
}

.checkin-confirm-btn {
  margin-top: 6px;
}

.checkin-success {
  text-align: center;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.checkin-success-icon { font-size: 3rem; }
.checkin-success-title { font-size: 1.4rem; font-weight: 700; color: var(--ink); margin: 0; }
.checkin-success-sub  { color: var(--muted); margin: 0; }

.checkin-none {
  text-align: center;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.checkin-none-icon { font-size: 2.5rem; }
.checkin-none-text { font-weight: 600; color: var(--ink); margin: 0; }
.checkin-none-sub  { color: var(--muted); margin: 0; font-size: 0.9rem; }

.checkin-back {
  margin-top: 16px;
  width: 100%;
}

.scard-notify-btn {
  margin-top: 4px;
  font-size: 0.78rem;
  padding: 5px 10px;
}

/* Header links row (staff page has two header links) */
.header-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Sign-up button */
.scard-btn {
  margin-top: 2px;
  width: 100%;
  padding: 10px 14px;
  font-size: 0.92rem;
  border-radius: 9px;
  font-weight: 800;
}

/* Override old 60vh rooms rule */
.volunteer #status:not(:empty) {
  min-height: auto;
  display: block;
  text-align: center;
  padding: 48px 0;
  scroll-snap-align: unset;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .masthead-stat  { display: none; }
  .filter-bar     { top: 63px; }
  .shift-grid-compact { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .filter-bar-inner { gap: 8px; }
  .seg { padding: 6px 10px; font-size: 0.82rem; }
  .chip-row { gap: 6px; }
}

/* ─── Mobile header ──────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Hide the long brand name — just show the heart logo to save header space */
  .brand-text { display: none; }

  /* Shrink nav buttons so they don't crowd the header */
  .header-links .btn {
    padding: 7px 13px;
    font-size: 0.82rem;
  }

  /* Filter bar sits right below the tighter header (logo 42px + 2×10px padding) */
  .filter-bar { top: 62px; }

  /* Sign-up dialog fills more of the screen on small phones */
  dialog { width: 96%; border-radius: 14px; }

  /* Cancel card buttons stack vertically */
  .cancel-confirm-btns { flex-direction: column; }
  .cancel-confirm-btns .btn { width: 100%; }
}

/* ── Read-only Calendar page ─────────────────────────────────────────────── */
.cal-group { margin-bottom: 28px; }
.cal-date {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand, #6b4ef0);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border, #ece9f8);
}
.cal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
.cal-activity { font-weight: 700; font-size: 1rem; }
.cal-time { color: var(--muted, #6b7280); font-size: 0.95rem; white-space: nowrap; }
.cal-location { color: var(--muted, #6b7280); font-size: 0.875rem; font-style: italic; margin-left: auto; }

@media (max-width: 560px) {
  .cal-row { flex-direction: column; align-items: flex-start; gap: 4px; }
}
