/* In the Loop public events site for Booker High. Same colors and fonts as the staff app.
   Fonts are served from this site, not Google, so visits aren't shared. */

@font-face { font-family: "Bebas Neue"; font-weight: 400; font-display: swap; src: url("/fonts/bebas-neue-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 400; font-display: swap; src: url("/fonts/lato-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-display: swap; src: url("/fonts/lato-latin-700-normal.woff2") format("woff2"); }

:root {
	--plum: #4C2C4E; --plum-dark: #3A2060; --plum-tint: #F3EDF4;
	--gold: #C5B358; --gold-tint: #F1E6B4;
	--rust: #8E5448; --rust-tint: #FBF3F1;
	--ink: #2B2B30; --muted: #5A5D68; --line: #DAD5DB; --line-soft: #E6DFE7;
	--page: #F7F4F7;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Lato, system-ui, sans-serif; color: var(--ink); background: var(--page); font-size: 16px; line-height: 1.5; }
a { color: var(--plum); }
a:hover { color: var(--rust); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }
h1, .h2 { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; letter-spacing: .5px; color: var(--plum); margin: 0; }
h1 { font-size: 44px; line-height: 1.05; }
.h2 { font-size: 26px; }
.flat { margin: 0; }
.lead { font-size: 18px; margin: 8px 0 0; max-width: 640px; }
.prewrap { white-space: pre-wrap; }
.empty { color: var(--muted); text-align: center; padding: 24px; margin: 0; }

/* Header */
.top { background: var(--plum); }
.top-in { max-width: 1100px; margin: 0 auto; padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; margin-right: auto; }
.brand:hover { color: #fff; }
.brand b { display: block; font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 28px; line-height: 1; color: var(--gold); letter-spacing: 1px; }
.brand small { display: block; font-size: 13px; color: #fff; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.nav a { color: #fff; text-decoration: none; font-weight: 700; padding: 6px 0; border-bottom: 3px solid transparent; }
.nav a[aria-current="page"], .nav a:hover { border-bottom-color: var(--gold); color: #fff; }

main { max-width: 1100px; margin: 0 auto; padding: 32px 24px 48px; display: flex; flex-direction: column; gap: 24px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 8px; font-weight: 700; text-decoration: none; border: 2px solid transparent; }
.btn1 { background: var(--plum); color: #fff; }
.btn1:hover { background: var(--plum-dark); color: #fff; }
.btn2 { background: #fff; color: var(--plum); border-color: var(--plum); }
.btn-gold { background: var(--gold); color: #2B2B30; }
.btn-gold:hover { background: var(--gold-tint); color: #2B2B30; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }
.top-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.icon { min-width: 44px; padding: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.actions.start { margin-top: 0; }

/* Cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.hero { padding: 8px 0; }
.staff-card { background: var(--plum-tint); border-color: var(--plum); }

/* Category tags */
.k { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; border: 1px solid transparent; }
.k-vpa { background: #4C2C4E; color: #fff; }
.k-ath { background: #8E5448; color: #fff; }
.k-fund { background: #F1E6B4; color: #3B2A3D; border-color: #C5B358; }
.k-parent { background: #D3E5F0; color: #173B52; border-color: #4F7FA0; }
.k-acad { background: #D8EBDD; color: #1E4A2B; border-color: #4D8A5E; }
.k-club { background: #DDD0E2; color: #3B2A3D; border-color: #4C2C4E; }
.k-other { background: #fff; color: #2B2B30; border: 1px dashed #838692; }

/* Event list */
.ev-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ev-card { display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.ev-card:first-child { border-top: 0; padding-top: 0; }
.ev-date { flex: 0 0 60px; text-align: center; border: 2px solid var(--plum); border-radius: 8px; padding: 4px 0; align-self: flex-start; }
.ev-date span { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; color: var(--rust); }
.ev-date b { display: block; font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 30px; line-height: 1; color: var(--plum); }
.ev-body { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.ev-title { font-weight: 700; font-size: 18px; }
.ev-when { color: var(--muted); font-size: 15px; }

/* Month grid (wide screens only; the list below works everywhere) */
.intro-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.month-nav { display: flex; align-items: center; gap: 12px; }
.month-name { font-size: 18px; min-width: 150px; text-align: center; }
.cal-grid { display: flex; flex-direction: column; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dow { padding: 10px; font-size: 13px; font-weight: 700; color: var(--muted); border-bottom: 2px solid var(--line); }
.ev { display: block; font-size: 12px; line-height: 1.3; padding: 3px 6px; border-radius: 4px; text-decoration: none; color: var(--ink); border: 1px solid transparent; overflow: hidden; text-overflow: ellipsis; }
.ev.k-vpa, .ev.k-ath, .ev.k-vpa:hover, .ev.k-ath:hover { color: #fff; }
.evt { font-weight: 700; margin-right: 4px; }
@media (max-width: 760px) {
	.grid-card { display: none; }
	h1 { font-size: 36px; }
	main { padding: 24px 16px 40px; }
	.top-in { padding: 12px 16px; }
}

/* Event page */
.event-h { font-size: 40px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.flyer img { max-width: 100%; max-height: 720px; border: 1px solid var(--line); border-radius: 8px; }

/* Subscribe page */
.intro { display: flex; flex-direction: column; }
.feed { display: block; padding: 10px 12px; background: var(--page); border: 1px solid var(--line); border-radius: 6px; overflow-wrap: anywhere; font-size: 15px; user-select: all; }

/* Footer */
.foot { border-top: 1px solid var(--line); background: #fff; }
/* Keep the footer at the bottom of the window on short pages. */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
body > .top, body > .foot { flex: 0 0 auto; }
.foot-in { max-width: 1100px; margin: 0 auto; padding: 14px 24px; display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }

/* ---- Cancelled and moved events ---- */
.flag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.flag-cancelled { background: #A3322A; color: #fff; }
.flag-postponed { background: var(--gold-tint); color: #5C4A00; border: 1px solid var(--gold); }
.ev-card.is-cancelled .ev-title { text-decoration: line-through; }
.ev-card.is-cancelled .ev-date, .ev-card.is-moved .ev-date { border-color: var(--muted); }
.ev-card.is-moved { opacity: .85; }
.ev-change { font-size: 15px; color: var(--rust); font-weight: 700; }
.ev .evx { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ev.cancelled { opacity: .8; }
.ev.cancelled .evn { text-decoration: line-through; }
.ev.moved { background: #fff; color: var(--muted); border: 1px dashed var(--muted); }
.change-banner { border: 2px solid #A3322A; background: var(--rust-tint); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; }
.change-banner strong { color: #A3322A; font-size: 18px; }
.change-banner.change-postponed { border-color: var(--gold); background: var(--gold-tint); }
.change-banner.change-postponed strong { color: #5C4A00; }
.showing-list { margin: 4px 0 0; padding-left: 18px; }

/* Month weeks: the numbers, then the multi-day bars, then each day's own events.
   Day lines are drawn as a background so bars can cross them. */
.cal-week { align-content: start; min-height: 104px; border-bottom: 1px solid var(--line-soft);
	background: repeating-linear-gradient(to right, transparent 0 calc(100% / 7 - 1px), var(--line-soft) calc(100% / 7 - 1px) calc(100% / 7)); }
.cal-week .n { justify-self: start; margin: 6px 6px 2px; padding: 0 7px; font-size: 13px; font-weight: 700; }
.cal-week .n.mute { color: #A9A4AC; }
.cal-week .n.today { background: var(--plum); color: #fff; border-radius: 10px; }
.cell-evs { display: flex; flex-direction: column; gap: 4px; padding: 2px 6px 6px; min-width: 0; }
.gc-1 { grid-column-start: 1; } .gc-2 { grid-column-start: 2; } .gc-3 { grid-column-start: 3; } .gc-4 { grid-column-start: 4; } .gc-5 { grid-column-start: 5; } .gc-6 { grid-column-start: 6; } .gc-7 { grid-column-start: 7; } 
.gs-1 { grid-column-end: span 1; } .gs-2 { grid-column-end: span 2; } .gs-3 { grid-column-end: span 3; } .gs-4 { grid-column-end: span 4; } .gs-5 { grid-column-end: span 5; } .gs-6 { grid-column-end: span 6; } .gs-7 { grid-column-end: span 7; } 
.gr-1 { grid-row-start: 1; } .gr-2 { grid-row-start: 2; } .gr-3 { grid-row-start: 3; } .gr-4 { grid-row-start: 4; } .gr-5 { grid-row-start: 5; } .gr-6 { grid-row-start: 6; } .gr-7 { grid-row-start: 7; } .gr-8 { grid-row-start: 8; } .gr-9 { grid-row-start: 9; } .gr-10 { grid-row-start: 10; } .gr-11 { grid-row-start: 11; } .gr-12 { grid-row-start: 12; } .gr-13 { grid-row-start: 13; } .gr-14 { grid-row-start: 14; } .gr-15 { grid-row-start: 15; } .gr-16 { grid-row-start: 16; } 
/* A multi-day event: one bar across its days. */
.ev.bar { align-self: start; margin: 2px 6px; min-width: 0; white-space: nowrap; }
.ev.bar .evx { display: inline; margin-right: 6px; }
.ev.bar.from-before { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.ev.bar.to-after { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* Events whose day has passed: greyed out. */
.ev.past { filter: grayscale(1); opacity: .5; }
.ev.past:hover { opacity: .8; }

/* "Still being tested" bar under the header (TESTING_NOTICE in src/brand.ts). */
.testing-notice { background: #F1E6B4; color: #3B2A3D; border-bottom: 2px solid #C5B358; padding: 10px 16px; text-align: center; font-size: 15px; }
