/* Responsive public offer dialog and payment verification surfaces. */
.event-popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: max(.75rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right))
        max(.75rem, env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left));
    background: rgba(8, 8, 8, .72);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}
.event-popup-backdrop.is-open { display: flex; }
.event-popup-card {
    position: relative;
    width: min(34rem, 100%);
    max-height: 88vh;
    max-height: 88dvh;
    overflow: hidden;
    border: 1px solid rgba(255, 210, 31, .76);
    border-radius: 1.25rem;
    background: var(--color-ink-soft);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .48);
}
.event-popup-visual {
    position: relative;
    overflow: hidden;
    background: var(--color-ink-soft);
}
.event-popup-visual picture,
.event-popup-image {
    display: block;
    width: 100%;
}
.event-popup-image {
    height: auto;
    max-height: none;
    object-fit: cover;
    object-position: center;
}
.event-popup-poster-link {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: block;
}
.event-popup-content {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .45rem;
    padding: clamp(1rem, 4vw, 1.6rem);
    color: #fff;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 10, .45) 22%, rgba(10, 10, 10, .94) 100%);
    pointer-events: none;
}
.event-popup-eyebrow {
    margin: 0;
    color: var(--color-champagne);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .16em;
    line-height: 1.2;
    text-transform: uppercase;
}
.event-popup-title {
    display: -webkit-box;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    color: #fff;
    font-family: var(--font-display, inherit);
    font-size: clamp(1.15rem, 4vw, 1.65rem);
    font-weight: 800;
    line-height: 1.2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.event-popup-description {
    display: -webkit-box;
    max-width: 42rem;
    margin: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, .86);
    font-size: .85rem;
    line-height: 1.4;
    white-space: pre-line;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.event-popup-cta {
    position: relative;
    z-index: 3;
    display: inline-flex;
    min-height: 2.65rem;
    align-items: center;
    justify-content: center;
    margin-top: .35rem;
    padding: .65rem 1.2rem;
    border-radius: 999px;
    background: var(--color-champagne);
    color: var(--color-ink);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-decoration: none;
    text-transform: uppercase;
    pointer-events: auto;
    transition: filter .16s ease, transform .16s ease;
}
.event-popup-cta:hover { filter: brightness(.95); transform: translateY(-1px); }
.event-popup-close {
    position: absolute;
    z-index: 4;
    top: .85rem;
    right: .85rem;
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border: 1px solid rgba(255, 210, 31, .58);
    border-radius: 50%;
    background: rgba(10, 10, 10, .78);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}
.event-popup-close:hover {
    transform: scale(1.05);
    border-color: var(--color-champagne);
    background: var(--color-champagne);
    color: var(--color-ink);
}
.event-popup-close:focus-visible,
.event-popup-cta:focus-visible,
.event-popup-poster-link:focus-visible {
    outline: 3px solid var(--color-champagne);
    outline-offset: 3px;
}

body.admin-theme .payment-summary-card,
body.admin-theme .payment-filter-panel,
body.admin-theme .payment-table-panel {
    border-color: var(--admin-border) !important;
    background: var(--admin-surface) !important;
    box-shadow: var(--admin-shadow);
    backdrop-filter: blur(16px) saturate(135%);
    -webkit-backdrop-filter: blur(16px) saturate(135%);
}
body.admin-theme .payment-summary-card > span:first-child,
body.admin-theme .payment-table-panel p,
body.admin-theme .payment-table-panel .text-muted { color: var(--admin-muted) !important; }
body.admin-theme .payment-summary-card > span:nth-child(2),
body.admin-theme .payment-table-panel h2 { color: var(--admin-ink) !important; }
body.admin-theme .payment-table-panel > div:first-child { border-color: var(--admin-border) !important; }
body.admin-theme .payment-filter-panel input,
body.admin-theme .payment-filter-panel select {
    min-height: 2.7rem;
    border-color: var(--admin-border-strong) !important;
    background: var(--admin-surface-strong) !important;
    color: var(--admin-ink) !important;
}
body.admin-theme .payment-filter-panel input::placeholder { color: var(--admin-subtle); }
body.admin-theme .payment-filter-panel input:focus,
body.admin-theme .payment-filter-panel select:focus {
    border-color: var(--admin-gold) !important;
    outline: 2px solid color-mix(in srgb, var(--admin-gold) 25%, transparent);
    outline-offset: 1px;
}
body.admin-theme .payments-table { min-width: 940px; }
body.admin-theme .payments-table thead { background: var(--admin-surface-soft) !important; }
body.admin-theme .payments-table thead th { color: var(--admin-muted) !important; }
body.admin-theme .payments-table tbody tr { border-color: var(--admin-border) !important; }
body.admin-theme .payments-table tbody tr:hover { background: var(--admin-surface-soft) !important; }
body.admin-theme .payments-table td { color: var(--admin-ink); }
body.admin-theme .payments-table td[data-label]::before { display: none; }
body.admin-theme .payments-table button {
    min-height: 2.45rem;
    padding-inline: .8rem;
}

@media (max-width: 767px) {
    .event-popup-backdrop { padding: .55rem; }
    .event-popup-card {
        width: min(34rem, calc(100vw - 1.1rem));
        max-height: 86vh;
        max-height: 86dvh;
        border-radius: 1rem;
    }
    .event-popup-content { gap: .35rem; padding: 1rem; }
    .event-popup-description { font-size: .78rem; }
    .event-popup-cta { min-height: 2.5rem; }
    .event-popup-close { top: .6rem; right: .6rem; width: 2.35rem; height: 2.35rem; }

    .payment-summary-grid { gap: .65rem !important; margin-bottom: 1.1rem !important; }
    body.admin-theme .payment-summary-card { min-width: 0; padding: .9rem !important; }
    body.admin-theme .payment-summary-card > span:nth-child(2) { font-size: 1.25rem; }
    body.admin-theme .payment-filter-panel { padding: 1rem !important; }
    body.admin-theme .payment-table-panel > div:first-child { padding: 1rem !important; }
    body.admin-theme .payment-table-panel > div.overflow-x-auto { overflow: visible; }
    body.admin-theme .payments-table { display: block; min-width: 0; }
    body.admin-theme .payments-table thead { display: none; }
    body.admin-theme .payments-table tbody {
        display: grid;
        gap: .75rem;
        padding: .75rem;
    }
    body.admin-theme .payments-table tbody tr.payment-row {
        display: grid;
        min-width: 0;
        overflow: hidden;
        border: 1px solid var(--admin-border) !important;
        border-radius: .9rem;
        background: var(--admin-surface-strong);
        box-shadow: 0 8px 20px -18px rgba(0, 0, 0, .48);
    }
    body.admin-theme .payments-table tbody tr > td[colspan] { display: block; }
    body.admin-theme .payments-table tbody tr.payment-row td[data-label] {
        display: flex;
        min-width: 0;
        align-items: flex-start;
        justify-content: space-between;
        gap: .8rem;
        padding: .7rem .85rem !important;
        border-bottom: 1px solid var(--admin-border);
        text-align: right;
        overflow-wrap: anywhere;
        white-space: normal;
    }
    body.admin-theme .payments-table tbody tr.payment-row td[data-label]::before {
        display: block;
        flex: 0 0 6.2rem;
        color: var(--admin-muted);
        content: attr(data-label);
        font-family: var(--font-sans);
        font-size: .66rem;
        font-weight: 800;
        letter-spacing: .06em;
        line-height: 1.5;
        text-align: left;
        text-transform: uppercase;
    }
    body.admin-theme .payments-table tbody tr.payment-row td[data-label="Payment"] {
        background: var(--admin-surface-soft);
        font-size: .88rem;
    }
    body.admin-theme .payments-table tbody tr.payment-row td[data-label="Event"] {
        max-width: none !important;
        overflow: visible;
        text-overflow: clip;
    }
    body.admin-theme .payments-table tbody tr.payment-row td[data-label="Action"] {
        display: block;
        padding: .8rem .85rem !important;
        text-align: left;
    }
    body.admin-theme .payments-table tbody tr.payment-row td[data-label="Action"]::before {
        margin-bottom: .55rem;
    }
    body.admin-theme .payments-table td[data-label="Action"] > div,
    body.admin-theme .payments-table td[data-label="Action"] form { display: flex; }
    body.admin-theme .payments-table td[data-label="Action"] > div { justify-content: flex-start; gap: .55rem; }
    body.admin-theme .payments-table td[data-label="Action"] button { min-width: 5.5rem; min-height: 2.75rem; }
    body.admin-theme .payments-table tbody tr.payment-row td:last-child { border-bottom: 0; }
}

    .fonepay-eyebrow {
        color: #ce2027;
        font-size: .68rem;
        font-weight: 800;
        letter-spacing: .14em;
        text-transform: uppercase;
    }
    .fonepay-brand-chip {
        display: inline-flex;
        align-items: center;
        border-radius: 999px;
        background: #ce2027;
        color: #fff;
        font-size: .85rem;
        font-weight: 800;
        letter-spacing: .01em;
        padding: .55rem .9rem;
    }
    .fonepay-checkout { border-top: 3px solid #ce2027; }
    .fonepay-checkout [hidden] { display: none !important; }
    .fonepay-logo {
        display: block;
        width: min(10rem, 42vw);
        height: auto;
        object-fit: contain;
    }
    .fonepay-session-timer {
        display: grid;
        gap: .1rem;
        min-width: 6rem;
        padding: .45rem .7rem;
        border: 1px solid #f1c5c7;
        border-radius: .55rem;
        background: #fff7f7;
        color: #0a0d12;
        text-align: center;
    }
    .fonepay-session-timer span {
        color: #6b7280;
        font-size: .62rem;
        font-weight: 750;
        letter-spacing: .04em;
        text-transform: uppercase;
    }
    .fonepay-session-timer time {
        color: #ce2027;
        font-size: 1rem;
        font-variant-numeric: tabular-nums;
        font-weight: 850;
        line-height: 1.15;
    }
    .fonepay-expired {
        border: 1px solid #f1c5c7;
        border-radius: .7rem;
        background: #fff7f7;
        color: #0a0d12;
        padding: 1.1rem;
    }
    .fonepay-expired h3 { font-size: 1rem; font-weight: 800; }
    .fonepay-expired p { margin: .35rem 0 .8rem; color: #4b5563; font-size: .88rem; line-height: 1.5; }
    .fonepay-expired a { color: #ce2027; font-size: .9rem; font-weight: 800; text-decoration: underline; }
    .fonepay-preview-qr {
        max-width: 300px;
        aspect-ratio: 1;
    }
    .fonepay-status-box {
        display: flex;
        min-height: 3rem;
        align-items: center;
        gap: .7rem;
        border-radius: .65rem;
        background: #f7f7f7;
        color: #0a0d12;
        padding: .8rem 1rem;
    }
    .fonepay-spinner {
        display: inline-block;
        width: 1rem;
        height: 1rem;
        flex: 0 0 auto;
        border: 2px solid #dedede;
        border-top-color: #ce2027;
        border-radius: 50%;
        animation: fonepay-spin .8s linear infinite;
    }
    .fonepay-check-button {
        display: inline-flex;
        min-height: 2.9rem;
        align-items: center;
        justify-content: center;
        border: 1px solid #ce2027;
        border-radius: .55rem;
        background: #ce2027;
        color: #fff;
        font-size: .9rem;
        font-weight: 750;
        padding: .7rem 1rem;
        transition: background .15s ease, border-color .15s ease;
    }
    .fonepay-check-button:hover { border-color: #a9181e; background: #a9181e; }
    .fonepay-check-button:disabled { cursor: wait; opacity: .65; }
    .fonepay-bank-option {
        display: flex;
        min-height: 4rem;
        align-items: center;
        gap: .75rem;
        border: 1px solid #e5e5e5;
        border-radius: .6rem;
        background: #fff;
        color: #0a0d12;
        padding: .65rem;
        text-align: left;
        transition: border-color .15s ease, box-shadow .15s ease;
    }
    .fonepay-bank-option:hover,
    .fonepay-bank-option:focus-visible {
        border-color: #ce2027;
        outline: none;
        box-shadow: 0 0 0 2px rgb(206 32 39 / 12%);
    }
    .fonepay-bank-option:disabled { cursor: not-allowed; opacity: .6; }
    .fonepay-bank-option img { width: 2.5rem; height: 2.5rem; object-fit: contain; }
    .fonepay-bank-option span { font-size: .84rem; font-weight: 700; }
    .fonepay-result { margin-top: 1rem; border-radius: .7rem; padding: 1.2rem; }
    .fonepay-result h3 { font-size: 1.1rem; font-weight: 800; }
    .fonepay-result p { margin: .35rem 0 .8rem; font-size: .9rem; }
    .fonepay-result a { font-size: .9rem; font-weight: 750; text-decoration: underline; }
    .fonepay-result-success { border: 1px solid #a7f3d0; background: #ecfdf3; color: #065f46; }
    .fonepay-result-failure { border: 1px solid #fecdd3; background: #fff1f2; color: #9f1239; }
    @keyframes fonepay-spin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
    .fonepay-session-timer { min-width: 5.5rem; }
    .fonepay-logo { width: min(8.5rem, 40vw); }
}

@media (prefers-reduced-motion: reduce) {
        .event-popup-cta,
        .event-popup-close,
        .fonepay-check-button,
        .fonepay-bank-option { transition: none; }
        .fonepay-spinner { animation-duration: 2s; }
}
