/*
 * pantry-theme.css — VCKC Food Pantry component styles for the public flow.
 *
 * These rules consume the tokens in pantry-tokens.css. They should NOT contain
 * raw hex values — change the palette in pantry-tokens.css and everything here
 * follows. Loaded after the Sparrow theme so it wins where they overlap.
 */

/* ── Base ──────────────────────────────────────────────────────────────── */
body {
  background-color: var(--pantry-background);
  color: var(--pantry-text);
  /* Beneficiaries read these pages on phones, often in a second language —
     a slightly larger base size + looser line-height reads more comfortably. */
  font-size: 1.0625rem;   /* 16 → 17px */
  line-height: 1.55;
}
h1, h2, h3, h4, h5, h6 {
  color: var(--pantry-primary);
}

/* ── Larger form + helper text for the public flow ─────────────────────── */
.form-label,
.form-control,
.form-select,
.form-check-label {
  font-size: 1.0625rem;   /* match the bumped body size */
}
.form-text {
  font-size: 0.9375rem;   /* helper lines: ~15px, still secondary but legible */
}
/* The sectioned card sub-heads on the sign-in / order pages (h2.h6). */
.card .h6 {
  font-size: 0.95rem;
}

/* ── Buttons (per the palette doc) ────────────────────────────────────────
   This Sparrow build's compiled `.btn` does NOT consume Bootstrap 5.3's
   `--bs-btn-*` custom properties, so the brand buttons must set real
   background / border / color (and their hover/active states) directly. */
.btn-pantry-primary,
.btn-pantry-primary:visited {
  background-color: var(--pantry-secondary);
  border: 1px solid var(--pantry-secondary);
  color: #fff;
}
.btn-pantry-primary:hover,
.btn-pantry-primary:focus,
.btn-pantry-primary:active {
  background-color: var(--pantry-secondary-dark);
  border-color: var(--pantry-secondary-dark);
  color: #fff;
}
.btn-pantry-accent,
.btn-pantry-accent:visited {
  background-color: var(--pantry-accent);
  border: 1px solid var(--pantry-accent);
  color: var(--pantry-primary-dark);
}
.btn-pantry-accent:hover,
.btn-pantry-accent:focus,
.btn-pantry-accent:active {
  background-color: var(--pantry-accent-dark);
  border-color: var(--pantry-accent-dark);
  color: #fff;
}
.btn-pantry-outline,
.btn-pantry-outline:visited {
  background-color: transparent;
  border: 1px solid var(--pantry-primary);
  color: var(--pantry-primary);
}
.btn-pantry-outline:hover,
.btn-pantry-outline:focus,
.btn-pantry-outline:active {
  background-color: var(--pantry-primary);
  border-color: var(--pantry-primary);
  color: #fff;
}

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--pantry-surface);
  border: 1px solid var(--pantry-border);
  border-radius: var(--pantry-radius);
  box-shadow: var(--pantry-shadow);
}

/* ── Public top bar (used by the form pages' publicLayout) ─────────────── */
.pantry-topbar {
  background-color: var(--pantry-primary);
}
/* The VCKC badge is black line-art; invert it to white so it reads against
   the navy top bar next to the wordmark. */
.pantry-brand-logo {
  filter: brightness(0) invert(1);
}

/* ── "Today · 10 AM – 12 PM" pill on the open splash ──────────────────── */
.pantry-today {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  margin: 0 auto 1.4rem;
}

/* ── "Next open" teaser on the closed splash ──────────────────────────── */
.pantry-next {
  display: inline-flex;
  align-items: center;
  background: var(--pantry-secondary);
  border: 1px solid var(--pantry-secondary);
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  margin: 0 auto 1.4rem;
}

/* ── Closed-pantry notice on the splash ───────────────────────────────── */
.pantry-closed {
  max-width: 34rem;
  text-align: center;
  color: #fff;
}
.pantry-closed__icon {
  font-size: 2rem;
  opacity: 0.85;
  margin-bottom: 0.75rem;
  display: inline-block;
}
.pantry-closed__title {
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.6rem, 5.5vw, 2.25rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}
.pantry-closed__help {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  margin: 0 auto 1.5rem;
  max-width: 26rem;
}
.pantry-closed__hours {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--pantry-radius);
  padding: 1rem 1.35rem;
  max-width: 24rem;
  margin: 0 auto;
  backdrop-filter: blur(3px);
}
.pantry-closed__hours-title {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 0.6rem;
}
.pantry-closed__hour {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 1.05rem;
}
.pantry-closed__hour:first-of-type {
  border-top: 0;
}
.pantry-closed__day {
  font-weight: 700;
  text-align: left;
}
.pantry-closed__time {
  color: rgba(255, 255, 255, 0.92);
  text-align: right;
  white-space: nowrap;
}

/* ── Full-screen splash / hero (the welcome page) ─────────────────────── */
.pantry-splash {
  min-height: 100vh;
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  background-image: var(--pantry-hero-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* Navy directional overlay so white type stays legible over any crop. */
.pantry-splash::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(13, 37, 51, 0.45) 0%,
    rgba(13, 37, 51, 0.78) 100%
  );
}
.pantry-splash > * {
  position: relative;
  z-index: 1;
}
.pantry-splash__lang {
  display: flex;
  justify-content: flex-end;
  padding: 1rem;
}
.pantry-splash__content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 1.5rem 1.5rem 4rem;
}
.pantry-splash__content h1 {
  color: #fff;
}
.pantry-splash__content .lead {
  color: rgba(255, 255, 255, 0.9);
}

/* Language toggle sitting on a dark surface (splash overlay or navy topbar):
   make the outline buttons light so they read against the dark background. */
.pantry-splash__lang .btn-outline-secondary,
.pantry-topbar .btn-outline-secondary {
  --bs-btn-color: #fff;
  --bs-btn-border-color: rgba(255, 255, 255, 0.6);
  --bs-btn-hover-color: var(--pantry-primary);
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-border-color: #fff;
}
.pantry-splash__lang .btn-outline-secondary.active,
.pantry-topbar .btn-outline-secondary.active {
  --bs-btn-bg: #fff;
  --bs-btn-color: var(--pantry-primary);
  --bs-btn-border-color: #fff;
}
