/* ===== Public Event Page (.pe-) ===== */

/* Card wrapper */
.pe-card {
    width: 100%;
    background: var(--bg-card);
    /* Refinement: flat, editorial edge (1px hairline) instead of a drop shadow,
       with more internal padding and inter-card spacing so content breathes. */
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: var(--size-5);
    margin-bottom: 1.25rem;
    box-shadow: none;
}

/* Section title */
.pe-section-title {
    font-size: var(--font-size-1);
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

/* Hero */
.pe-hero {
    width: 100%;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Marketing poster — sized large enough to read inner text/details.
   Portrait posters keep their aspect ratio: width-driven, no forced
   square crop. Capped by viewport so it never overflows the card.
   The poster is click-to-fullscreen (see LightboxImage) — pointer cursor
   and a subtle lift on hover signal the affordance. */
.pe-hero-img {
    display: block;
    margin: 0 auto;
    width: auto;
    max-width: min(460px, 100%);
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}
.pe-hero-img:hover,
.pe-hero-img:focus-visible {
    transform: scale(1.01);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* On small screens, cap the height only. The width stays capped by the base
   rule's 100%, the column; a viewport-based cap ignores the column's padding
   and pushed the poster past its right edge at 390 px. */
@media (max-width: 480px) {
    .pe-hero-img {
        max-height: 70vh;
    }
}

/* No poster: the generated art is a short band, not a portrait, so the
   name, date and register button stay on the first screen. Decorative and
   not clickable. */
.pe-hero--band {
    margin-bottom: 1.25rem;
}
.pe-hero-band {
    display: block;
    width: 100%;
    max-width: 460px;
    height: 160px;
    margin: 0 auto;
    object-fit: cover;
    border-radius: var(--radius);
}
@media (max-width: 480px) {
    .pe-hero-band {
        height: 112px;
    }
}

/* Event name + tagline */
.pe-name-block {
    width: 100%;
    text-align: center;
    margin-bottom: 1.5rem;
}

.pe-name {
    font-size: var(--font-size-4);
    font-weight: 700;
    color: #fff;
    /* Tighter tracking reads as more editorial/intentional at display sizes. */
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.pe-tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* Organizer attribution (F7-a): a quiet line under the title. */
.pe-organizer {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
}

/* Share row */
.pe-share-row {
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
}

.pe-share-copied {
    color: var(--success);
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.pe-detail-text {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.pe-map-link {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.pe-map-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.pe-detail-secondary {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Refund items */
.pe-refund-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.pe-refund-item {
    display: flex;
    /* Top-aligned: a centred tick sits beside the middle of a wrapped line. */
    align-items: flex-start;
    gap: 0.4rem;
}

.pe-check {
    color: #34d399;
    display: inline-flex;
    /* One line of .pe-refund-text (0.85rem x the body line height). */
    min-height: 1.4em;
    align-items: center;
    font-size: 0.85rem;
}

.pe-refund-note {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 0.75rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.pe-refund-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Hybrid note */
.pe-hybrid-note {
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* "Sign out" under the locked email: sized to its label, not the column. */
.pe-field-signout {
    align-self: flex-start;
    margin-top: 0.25rem;
}

/* Form elements */
.pe-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Persistent top-aligned field label */
.pe-field-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.125rem;
}

.pe-input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s ease;
}
.pe-input:focus {
    border-color: var(--accent);
}

.pe-input--error {
    border-color: #f87171;
    animation: pe-shake 0.3s ease;
}

@keyframes pe-shake {
    0%,
    100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-3px);
    }
    40% {
        transform: translateX(3px);
    }
    60% {
        transform: translateX(-2px);
    }
    80% {
        transform: translateX(2px);
    }
}

.pe-input--locked {
    color: var(--text-muted);
    opacity: 0.7;
    cursor: not-allowed;
}

.pe-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.pe-required {
    color: #f87171;
}

.pe-field-error {
    color: #f87171;
    font-size: 0.8rem;
}

/* Help text under a field (email for wallet sessions, real name for the
   venue). Smaller and muted so it does not read as a heading. */
.pe-field-hint {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Super GOAT SG1b: the person's standing against the event's regular rule */
.pe-regular-line {
    margin: 0 0 12px;
    padding: 8px 12px;
    border-left: 3px solid var(--success, #2e7d32);
    font-weight: 600;
}

.pe-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.pe-checkbox {
    margin-top: 0.2rem;
    accent-color: var(--accent);
}

/* Developer profile section (Issue #049) */
.pe-dev-profile-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 0.25rem;
}

.pe-dev-profile-section .pe-label {
    font-weight: 600;
    color: var(--text-primary);
}

.pe-multiselect-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.pe-multiselect-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.pe-multiselect-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem 0.75rem;
}

.pe-multiselect-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.pe-multiselect-item span {
    white-space: nowrap;
}

.pe-submit-btn {
    width: 100%;
    padding: 0.85rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition:
        background 0.15s ease,
        transform 0.1s ease;
}
.pe-submit-btn:hover {
    background: var(--accent-hover);
}
.pe-submit-btn:active {
    transform: translateY(1px);
}

.pe-success-box {
    padding: 0.75rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.pe-error-box {
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    color: #f87171;
    font-size: 0.85rem;
}

/* Loading / error states */
.pe-loading {
    text-align: center;
    padding: 3rem 0;
}

.pe-error-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.pe-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-line;
    margin: 0;
}

.pe-nft-img {
    max-width: 120px;
    border-radius: var(--radius);
}

.pe-ext-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Container with no gap */
.pe-container-nogap {
    gap: 0;
}

/* Text center */
.pe-text-center {
    text-align: center;
}

/* Icon wrapper with margin bottom */
.pe-icon-mb {
    margin-bottom: 1rem;
}

/* Icon wrapper with smaller margin */
.pe-icon-mb-sm {
    margin-bottom: 0.5rem;
}

/* Large success icon wrapper */
.pe-success-icon-lg {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Error/action message spacing */
.pe-msg-mb-lg {
    margin-bottom: 1.5rem;
}

/* Medium bottom margin */
.pe-mb-1 {
    margin-bottom: 1rem;
}

/* Small bottom margin */
.pe-mb-075 {
    margin-bottom: 0.75rem;
}

/* Tiny bottom margin */
.pe-mb-025 {
    margin-bottom: 0.25rem;
}
.pe-mt-025 {
    margin-top: 0.25rem;
}

/* Flex row with small gap */
.pe-flex-row-gap {
    display: flex;
    gap: 0.5rem;
}

/* Flex column with medium gap */
.pe-flex-col-gap-md {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Centered button row */
.pe-btn-row-center {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

/* Success colored title */
.pe-title-success {
    color: var(--success);
    margin-bottom: 0.5rem;
}

/* Success colored text */
.pe-text-success {
    color: var(--success);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Accent bold text */
.pe-text-accent-bold {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
}

/* "Happening now" marker (was a red-circle emoji, F1-c). */
.pe-live-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.375rem;
    border-radius: 50%;
    background: var(--danger);
    vertical-align: middle;
}

/* Countdown capsule badge */
.pe-countdown-capsule {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 9999px;
    padding: 0.2rem 0.6rem;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.15);
}

/* Left margin indent for field errors */
.pe-field-error-indent {
    margin-left: 1.5rem;
}

/* ── Landing Page Layout ─────────────────────────────────────────── */

.landing-page {
    min-height: 100vh;
    width: 100%;
}

.landing-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.landing-nav-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.landing-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 767px) {
    .landing-desktop-only-btn {
        display: none !important;
    }
}

/* ── Landing Brand Gradient ──────────────────────────────────────── */

.landing-brand-gradient {
    background: linear-gradient(135deg, #ff7b5c 0%, #ff5c39 40%, #ffab4d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

/* ── Landing Sections ────────────────────────────────────────────── */

/* ── Landing Section Headers ─────────────────────────────────────── */

/* ── Landing Typography ──────────────────────────────────────────── */

.landing-email-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Event meta rows: labelled When / Where / Format / Capacity (.plans/038 P2-b). */
.pe-meta {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.pe-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.pe-meta-row > .icon-sm {
    margin-top: 1.1rem;
    flex-shrink: 0;
}

.pe-meta-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.pe-meta-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.pe-meta-full {
    color: var(--danger-bright);
    font-weight: 600;
}

/* Attendance row: one block per track, a thin fill bar for a capped one. */
.pe-attendance-track {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    /* The body shrinks to its text; give the bar a real length. */
    width: 14rem;
    max-width: 100%;
    margin-bottom: 0.4rem;
}

/* One line under the reserve button: who is in, and the room left. */
.pe-hero-cta-caption {
    margin: 0.5rem 0 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Wide screens show the attendance row beside the button; the caption would repeat it. */
@media (min-width: 768px) {
    .pe-hero-cta-caption {
        display: none;
    }
}

.pe-cap-bar {
    height: 6px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
}

.pe-cap-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.pe-cap-bar-full .pe-cap-bar-fill {
    background: var(--danger-bright);
}

/* Build line in the landing footer (.plans/038 P2-f). */

/* Sponsor logo row (F7-b), last on the page, above the footer. Logos sit on
   the paper tone in greyscale and regain colour on hover or focus. */
.pe-sponsors {
    width: 100%;
    background: var(--paper);
    color: var(--paper-ink);
    border-radius: var(--radius);
    padding: var(--size-4) var(--size-5);
    margin-bottom: 1.25rem;
    text-align: center;
}

.pe-sponsors-title {
    /* The global h2 colour is light text for the dark cards. */
    color: var(--paper-ink);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 0.75rem;
    opacity: 0.7;
}

.pe-sponsors-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem 1.5rem;
}

.pe-sponsor {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: inherit;
    text-decoration: none;
    filter: grayscale(1);
    opacity: 0.75;
    transition: filter 0.2s ease, opacity 0.2s ease;
}

a.pe-sponsor:hover,
a.pe-sponsor:focus-visible {
    filter: none;
    opacity: 1;
}

.pe-sponsor-logo {
    display: block;
    max-height: 40px;
    max-width: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.pe-sponsor-name {
    font-weight: 600;
    font-size: 0.95rem;
}

@media (prefers-reduced-motion: reduce) {
    .pe-sponsor {
        transition: none;
    }
}

/* Live "on now / next" card, from the event's Ontime room (plan 050). Only
   rendered while the show runs. Tokens only, so it follows the attendee
   theme in light and dark. Timer digits are tabular so they do not jitter. */
.pe-live {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0 0 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    background: var(--bg-card);
}
.pe-live-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}
.pe-live-chip,
.pe-live-pace {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border: 1px solid currentColor;
    border-radius: var(--radius);
}
.pe-live-chip-live { color: var(--danger); }
.pe-live-chip-live::before { content: "● "; }
.pe-live-chip-paused { color: var(--text-secondary); }
.pe-live-pace-ontime { color: var(--success); }
.pe-live-pace-late { color: var(--warning); }
.pe-live-pace-ahead { color: var(--accent); }
.pe-live-label {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.pe-live-title {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.35;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}
.pe-live-fields,
.pe-live-next {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}
.pe-live-left {
    margin: 0.2rem 0 0;
    font-size: 1.6rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}
.pe-live-left.pe-live-over { color: var(--danger); }
/* An outlined track on the page's second paper: on the attendee theme
   `--border` is ink, so a filled track would read as a finished bar. */
.pe-live-bar {
    height: 6px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    overflow: hidden;
}
.pe-live-bar > span {
    display: block;
    height: 100%;
    background: var(--accent);
    transition: width 1s linear;
}
.pe-live-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.pe-live-foot a { color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
    .pe-live-bar > span { transition: none; }
}

/* Wallet-only visitor on a PromptPay-only event: they cannot pay the
   deposit until their email is proven (pull 321), so say it before the form. */
.pe-wallet-promptpay-hint {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    border-left: 4px solid var(--warning);
}
.pe-wallet-promptpay-hint .pe-detail-secondary {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
}
