/* =========================================================
   EliteDrive — gedeelde betaalkaart (EDPay)
   ---------------------------------------------------------
   Eén gebrande, ingebedde betaalervaring voor zowel het klanten-
   portaal als het beheer. Toont de scanbare Bancontact-QR in onze
   eigen huisstijl (zwart/goud van de website) met live status.

   Bewust een <dialog> + showModal(): zo verschijnt de kaart in de
   top-layer, óók boven de native <dialog> van de boekingdialoog in
   het beheer. Stijl is zelfstandig (eigen kleuren) zodat ze in
   beide apps identiek oogt. CSP-veilig: geen inline styles.
   ========================================================= */

.edpay {
    width: min(440px, 94vw);
    max-height: 92vh;
    overflow: auto;
    padding: 0;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 18px;
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(212, 175, 55, 0.12) 0%, rgba(212, 175, 55, 0) 60%),
        linear-gradient(180deg, #161616 0%, #0e0e0e 100%);
    color: #f4f1ea;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.4);
    font-family: inherit;
}
.edpay::backdrop {
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(3px);
}

.edpay-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 26px 24px 22px;
    text-align: center;
    min-width: 0;
}

.edpay-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: #cfcabb;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.edpay-close:hover {
    border-color: #d4af37;
    color: #f1d27b;
}

.edpay-brand {
    font-size: 12px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #d4af37;
    font-weight: 600;
}

.edpay-title {
    font-size: 15px;
    color: #cfcabb;
    margin: 0;
}
.edpay-ref {
    color: #8f8a7e;
    font-size: 12.5px;
}

.edpay-amount {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 0.01em;
    background: linear-gradient(135deg, #f1d27b 0%, #d4af37 55%, #a8862a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #d4af37;
    line-height: 1.1;
}

/* QR-zone: witte kaart (een QR scant het best op een lichte achtergrond). */
.edpay-qrwrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}
.edpay-qrbox {
    background: #ffffff;
    padding: 14px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    line-height: 0;
}
.edpay-qrbox img {
    display: block;
    width: 220px;
    height: 220px;
    max-width: 60vw;
    max-height: 60vw;
}
.edpay-scanhint {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #b8b3a6;
    max-width: 320px;
}
.edpay-otherdevice {
    margin: 2px 0 0;
    font-size: 12px;
    color: #8f8a7e;
}

/* "Betaal op dit toestel" — goud, als anker (geen popup-blok). */
.edpay-device {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 320px;
    padding: 13px 22px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--accent-2, #f1d27b) 0%, var(--accent-2, #d4af37) 55%, var(--accent-2-dark, #a8862a) 100%);
    color: #1a1a1a;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}
.edpay-device:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}
.edpay-device.secondary {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: #f1d27b;
}

/* Subtiele terugval-link op desktop ("liever op dit scherm betalen"). Bewust
   geen opvallende knop: de QR moet de hoofdweg blijven. */
.edpay-fallback {
    display: inline-block;
    background: none;
    border: none;
    padding: 0;
    margin: 2px 0 0;
    color: #8f8a7e;
    font-size: 12.5px;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.edpay-fallback:hover {
    color: #f1d27b;
}

/* Geruststelling dat de klant op onze pagina blijft (auto-bevestiging). */
.edpay-auto {
    margin: 2px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: #9a9487;
    max-width: 300px;
}

/* Statusregel: wacht op betaling / betaald. */
.edpay-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #b8b3a6;
    min-height: 20px;
}
.edpay-status .edpay-spin {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(212, 175, 55, 0.35);
    border-top-color: #d4af37;
    border-radius: 50%;
    animation: edpay-spin 0.8s linear infinite;
}
@keyframes edpay-spin {
    to {
        transform: rotate(360deg);
    }
}

.edpay-secure {
    margin: 2px 0 0;
    font-size: 12px;
    color: #8f8a7e;
}

.edpay-err {
    margin: 0;
    font-size: 13px;
    color: #e7a4a0;
    max-width: 320px;
}

/* Betaald-staat. */
.edpay-paid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 14px 0 6px;
}
.edpay-check {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(63, 174, 107, 0.15);
    border: 2px solid #3fae6b;
    color: #3fae6b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    line-height: 1;
}
.edpay-paid-title {
    font-size: 22px;
    font-weight: 700;
    color: #3fae6b;
}
.edpay-paid-sub {
    margin: 0;
    font-size: 13.5px;
    color: #b8b3a6;
}

.edpay-donebtn {
    margin-top: 4px;
    padding: 11px 28px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.5);
    background: transparent;
    color: #f1d27b;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}
.edpay-donebtn:hover {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.08);
}

/* Compacte ritsamenvatting onder de QR. */
.edpay-summary {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 14px;
    margin-top: 2px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}
.edpay-sum-route {
    font-size: 13px;
    color: #e7e3d8;
    line-height: 1.5;
    min-width: 0;
    overflow-wrap: anywhere;
}
.edpay-sum-route .edpay-arrow {
    color: #d4af37;
    margin: 0 6px;
}
.edpay-sum-meta {
    font-size: 12px;
    color: #8f8a7e;
}

/* Laadtoestand. */
.edpay-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
    color: #b8b3a6;
    font-size: 14px;
}
.edpay-loading .edpay-spin {
    width: 22px;
    height: 22px;
}

@media (max-width: 480px) {
    .edpay-card {
        padding: 22px 16px 18px;
    }
    .edpay-amount {
        font-size: 30px;
    }
}
