* { box-sizing: border-box; }

/* :root tokens, html{font-size:62.5%} rem-base, body base styles, header
   (.header-wrap/.header/.logo/.header-nav/.hamburger/.mobile-nav), and
   .site-footer/.footer-* now all come from ../style.css, loaded before
   this file on every events page -- same look as the rest of the site,
   not a separately-styled subsection. This file keeps only what's
   genuinely specific to the events pages' own body content.

   Everything below was originally written assuming the browser's default
   16px root (style.css's 62.5%-root convention wasn't being pulled in
   yet) -- rem values here are deliberately 1.6x their "plain" look to
   land on the same pixel sizes now that they share that smaller 10px
   root, so none of this content actually changes size by gaining
   style.css's rules. `body` gets an explicit 16px font-size for the
   same reason: a few selectors below never set their own font-size and
   relied on inheriting the old implicit 16px default. */
body { font-size: 16px; }

/* Page heading -- lives in <main>, not the (sticky, shared) header, so it
   scrolls away with the rest of the page instead of staying pinned. Same
   treatment as the homepage's own section headings (.sec-head h2 in
   ../style.css) -- centered, Russo One, same clamp() scale -- so this
   reads as the same site, not a separately-styled subsection. */
.page-title {
    font-family: 'Russo One', sans-serif;
    font-size: clamp(2.8rem, 4.5vw, 4rem);
    text-align: center;
    margin: 0 0 2.4rem;
}
.page-title span {
    color: var(--pink);
    text-shadow: 0 0 1.6rem rgba(255, 63, 176, .55);
}

main { max-width: 900px; margin: 3.2rem auto; padding: 0 1.6rem 4.8rem; }

/* Stack view */
.event-row {
    display: flex;
    gap: 2.4rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.6rem 1.92rem;
    margin-bottom: 1.28rem;
    align-items: baseline;
}
.event-date { font-weight: 600; color: var(--gold); white-space: nowrap; }
.event-info { display: flex; flex-direction: column; gap: 0.32rem; flex: 1; }
.event-title { font-weight: 600; }
.event-venue { color: var(--text-muted); font-size: 1.44rem; }
.event-details-link { font-size: 1.44rem; align-self: flex-start; color: var(--blue); }
.no-events { color: var(--text-muted); }

.load-more {
    display: block;
    margin: 1.6rem auto 0;
    padding: 0.96rem 2.56rem;
    background: var(--gold);
    color: #1a1304;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.6rem;
    font-weight: 600;
}

/* Carousel view */
.carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.6rem;
}
.carousel-track {
    position: relative;
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    gap: 2.4rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 0.8rem;
}
.carousel-card {
    flex: 0 0 35.2rem;
    scroll-snap-align: start;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.92rem 2.24rem;
    display: flex;
    flex-direction: column;
    gap: 0.48rem;
}
.carousel-card h3 { margin: 0; font-size: 1.76rem; }
.carousel-spacer { flex: 0 0 auto; width: calc(100% - 35.2rem); }
.carousel-btn {
    flex: 0 0 auto;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 50%;
    width: 4.16rem;
    height: 4.16rem;
    font-size: 1.6rem;
    color: var(--text);
    cursor: pointer;
}
.carousel-btn:disabled { opacity: 0.3; cursor: default; pointer-events: none; }

/* Modal */
.event-modal[hidden] { display: none; }
.event-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
.event-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }
.event-modal-content {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 2.4rem;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    width: 51.2rem;
}
.event-modal-close {
    position: absolute;
    top: 0.96rem;
    right: 1.28rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: 2.56rem;
    cursor: pointer;
    line-height: 1;
}
.modal-flyer { max-width: 100%; border-radius: 6px; display: block; margin-bottom: 1.28rem; }
.modal-new-tab-link { display: inline-block; margin-bottom: 1.6rem; font-size: 1.44rem; color: var(--blue); }
.modal-notes { white-space: pre-wrap; font-family: inherit; font-size: 1.52rem; color: var(--text-muted); }

/* Code entry (enter_code.php) */
.code-entry-main { max-width: 420px; }
.code-entry-form { display: flex; flex-direction: column; gap: 2.4rem; align-items: center; }
.code-boxes { display: flex; gap: 0.48rem; align-items: center; flex-wrap: nowrap; justify-content: center; }
.code-box {
    width: 6.4rem;
    min-width: 0;
    padding: 0.8rem 0.32rem;
    font-size: 1.92rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.16rem;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 4px;
}
.code-box:focus { border-color: var(--blue); }
.code-dash { font-size: 1.92rem; font-weight: 600; color: var(--text-muted); flex: none; }

@media (max-width: 360px) {
    .code-boxes { gap: 0.32rem; }
    .code-box { width: 4.8rem; padding: 0.8rem 0.16rem; font-size: 1.76rem; letter-spacing: 0; }
    .code-dash { font-size: 1.76rem; }
}
.code-entry-form button[type=submit] {
    padding: 1.12rem 3.2rem;
    font-size: 1.6rem;
    font-weight: 600;
    background: var(--gold);
    color: #1a1304;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.code-entry-form button[type=submit]:disabled { opacity: 0.4; cursor: default; }

/* Customer view (view_event.php) */
.customer-view-main { max-width: 700px; }
.customer-info-box, .attachments-box {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.92rem 2.4rem;
    margin-bottom: 2.4rem;
}
.customer-info-box dl { display: grid; grid-template-columns: auto 1fr; gap: 0.48rem 1.6rem; margin: 0; }
.customer-info-box dt { font-weight: 600; color: var(--text-muted); }
.customer-info-box dd { margin: 0; }
.attachments-box ul { margin: 0; padding-left: 1.92rem; }
.attachments-box a { color: var(--blue); }
.owner-email-link { display: inline-block; margin-top: 1.6rem; color: var(--blue); }

.overrides-box {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.92rem 2.4rem;
    margin-bottom: 2.4rem;
}
.overrides-box ul { margin: 0; padding-left: 1.92rem; }
.overrides-box li { margin-bottom: 0.64rem; }

/* Same badge styling as admin/admin.css's -- kept in this separate public
   stylesheet since admin.css is never loaded here. */
.status-badge {
    display: inline-block;
    padding: 0.24rem 0.96rem;
    border-radius: 999px;
    font-size: 1.28rem;
    font-weight: 600;
}
.status-badge.status-skipped { background: rgba(255, 63, 176, .18); color: var(--pink); }
.status-badge.status-modified { background: rgba(255, 207, 86, .18); color: var(--gold); }

@media (max-width: 600px) {
    .carousel-btn { display: none; }

    /* Below this width there isn't room for the date/time column and the
       title/venue/link column side by side -- stack them instead, matching
       the carousel card's own top-to-bottom order (date, title, venue,
       link). */
    .event-row { flex-direction: column; align-items: flex-start; gap: 0.64rem; }
    .event-date { white-space: normal; }
}
