/*!
 * Ada Stripe — Zahlungsfenster und Express-Buttons
 * (c) Ada Commerce GmbH
 */

/* ---------- Zahlungsfenster ---------- */

.adastripe-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.45);
}

.adastripe-overlay[hidden] {
    display: none;
}

body.adastripe-modal-open {
    overflow: hidden;
}

.adastripe-dialog {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 20px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.adastripe-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.adastripe-dialog-title {
    font-size: 1.1rem;
}

.adastripe-close {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #525252;
    cursor: pointer;
}

.adastripe-error {
    margin: 0;
}

.adastripe-element {
    min-height: 120px;
}

/* ---------- Ladezustand ---------- */

.adastripe-busy {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.adastripe-busy::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-top-color: #fff;
    border-radius: 50%;
    animation: adastripe-spin 0.8s linear infinite;
}

.adastripe-loading {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 1.1rem;
}

.adastripe-loading[hidden] {
    display: none;
}

.adastripe-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: adastripe-spin 0.8s linear infinite;
}

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

/* ---------- Express-Buttons ---------- */

.adastripe-express {
    padding: 10px 0;
}

.adastripe-express[hidden] {
    display: none;
}

/* Zusatzplatz im Theme (data-adastripe-express), z. B. feste Kaufleiste: ohne Abstand */
.adastripe-express--slot {
    padding: 0;
}

.adastripe-express-notice {
    margin: 6px 0 0;
    font-size: 0.8rem;
    color: #6c757d;
}

.adastripe-page-alert {
    margin-bottom: 12px;
}

@media (prefers-reduced-motion: reduce) {
    .adastripe-busy::after,
    .adastripe-spinner {
        animation-duration: 2s;
    }
}
