/*
 * Kappelli Paywall — Styles
 * Pixel-matched to the design mockup.
 */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */

.kap-wrapper {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
}

/* ── Paywall card ─────────────────────────────────────────────────────────── */

.kap-card {
    border: 1.5px solid #d2d2d2;
    border-radius: 8px;
    padding: 38px 44px 40px;
    text-align: center;
    background: #ffffff;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
}

@media (max-width: 600px) {
    .kap-card {
        padding: 28px 20px 30px;
    }
}

/* ── Title ────────────────────────────────────────────────────────────────── */

.kap-title {
    color: #c0392b;          /* Missio red */
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.35;
}

/* ── Description ──────────────────────────────────────────────────────────── */

.kap-desc {
    color: #444;
    font-size: 0.935rem;
    line-height: 1.7;
    margin: 0 auto 14px;
    max-width: 580px;
}

.kap-desc strong {
    font-weight: 700;
    color: #222;
}

/* ── "Learn more" link ────────────────────────────────────────────────────── */

.kap-missio-link {
    display: inline-block;
    color: #2980b9;
    font-size: 0.9rem;
    text-decoration: none;
    margin-bottom: 26px;
}

.kap-missio-link:hover,
.kap-missio-link:focus {
    text-decoration: underline;
    color: #1f6899;
}

/* ── Buttons (shared base) ────────────────────────────────────────────────── */

.kap-btn {
    display: inline-block;
    min-width: 270px;
    padding: 15px 36px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.015em;
    cursor: pointer;
    transition: filter 0.18s ease, transform 0.1s ease;
    color: #ffffff !important;
    text-decoration: none;
    line-height: 1;
}

.kap-btn:hover {
    filter: brightness(0.91);
}

.kap-btn:active {
    transform: scale(0.98);
}

.kap-btn:focus-visible {
    outline: 3px solid #2980b9;
    outline-offset: 3px;
}

/* ── Red button — €2 single chapel ───────────────────────────────────────── */

.kap-btn--red {
    background-color: #c0392b;
}

.kap-btn--red:hover {
    background-color: #a93226;
    filter: none;
}

/* ── Small note below red button ─────────────────────────────────────────── */

.kap-note {
    color: #888;
    font-size: 0.82rem;
    margin: 10px 0 18px;
}

/* ── OR divider ───────────────────────────────────────────────────────────── */

.kap-or {
    color: #aaa;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0 0 18px;
    text-transform: uppercase;
}

/* ── Orange/gold button — €9 all chapels ─────────────────────────────────── */

.kap-btn--orange {
    background: linear-gradient(160deg, #e8820c 0%, #f5a623 100%);
}

.kap-btn--orange:hover {
    filter: brightness(0.92);
}

/* ── Loading state ────────────────────────────────────────────────────────── */

.kap-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 20px;
    gap: 18px;
}

.kap-spinner {
    width: 44px;
    height: 44px;
    border: 5px solid #eee;
    border-top-color: #c0392b;
    border-radius: 50%;
    animation: kap-spin 0.75s linear infinite;
    flex-shrink: 0;
}

@keyframes kap-spin {
    to { transform: rotate(360deg); }
}

.kap-loading-text {
    color: #888;
    font-size: 0.9rem;
    margin: 0;
}

/* ── Access / countdown banner ────────────────────────────────────────────── */

.kap-access-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    background: #eafaf1;
    border: 1px solid #a9dfbf;
    border-radius: 6px;
    color: #1e8449;
    font-size: 0.88rem;
    padding: 10px 16px;
    margin-bottom: 20px;
}

.kap-access-icon {
    font-style: normal;
    font-size: 1rem;
    flex-shrink: 0;
}

.kap-countdown {
    font-weight: 700;
}

/* ── Protected content area ───────────────────────────────────────────────── */

.kap-content {
    /* no forced styles — let Divi / theme control the 3D content layout */
}

/* ── kap-protected Divi sections ──────────────────────────────────────────────
 * Hidden via CSS on page render — before any JS runs.
 * This prevents ANY flash of protected content.
 * JS adds body.kap-access-granted only after server confirms a valid token.
 * ─────────────────────────────────────────────────────────────────────────── */

.kap-protected {
    display: none !important;
    visibility: hidden !important;
}

body.kap-access-granted .kap-protected {
    display: block !important;
    visibility: visible !important;
}
