/**
 * GMRR Country Report — Exit Intent Sample PDF Popup Styles
 * Design tokens: navy #1e3a5f · gold #d4a017 · teal #0e9488 · off-white #f8fafc
 */

/* ── Overlay ── */
.gmrr-exit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: gmrr-exit-overlay-in 0.25s ease forwards;
}

.gmrr-exit-overlay[hidden] {
    display: none !important;
}

@keyframes gmrr-exit-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Card ── */
.gmrr-exit-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.3);
    max-width: 540px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    padding: 36px 36px 30px;
    animation: gmrr-exit-card-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    border-top: 4px solid #d4a017;
}

@keyframes gmrr-exit-card-in {
    from { transform: translateY(-16px) scale(0.96); opacity: 0; }
    to   { transform: translateY(0)     scale(1);    opacity: 1; }
}

/* ── Close button ── */
.gmrr-exit-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #94a3b8;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.gmrr-exit-close:hover {
    background: #f1f5f9;
    color: #334155;
}

/* ── Header ── */
.gmrr-exit-header {
    text-align: center;
    margin-bottom: 18px;
}

.gmrr-exit-icon {
    font-size: 2.6rem;
    line-height: 1;
    margin-bottom: 8px;
}

.gmrr-exit-kicker {
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d4a017;
    margin: 0 0 6px;
}

.gmrr-exit-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #1e3a5f;
    margin: 0 0 8px;
    line-height: 1.25;
}

.gmrr-exit-subtitle {
    font-size: 0.9rem;
    color: #475569;
    margin: 0;
    line-height: 1.6;
}

/* ── Trust badges ── */
.gmrr-exit-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 22px;
}

.gmrr-exit-badge {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    white-space: nowrap;
}

/* ── Form grid ── */
.gmrr-exit-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.gmrr-exit-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gmrr-exit-field--full {
    grid-column: 1 / -1;
}

.gmrr-exit-field label {
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.gmrr-exit-required {
    color: #ef4444;
}

.gmrr-exit-field input {
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.gmrr-exit-field input::placeholder {
    color: #94a3b8;
}

.gmrr-exit-field input:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}

.gmrr-exit-field input.gmrr-exit-input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ── Privacy note ── */
.gmrr-exit-privacy {
    font-size: 11.5px;
    color: #94a3b8;
    margin: 0 0 16px;
    line-height: 1.5;
    text-align: center;
}

.gmrr-exit-privacy a {
    color: #1e40af;
    text-decoration: underline;
}

/* ── Submit button ── */
.gmrr-exit-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(30, 58, 95, 0.35);
    letter-spacing: 0.01em;
}

.gmrr-exit-submit:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(30, 58, 95, 0.4);
}

.gmrr-exit-submit:active {
    transform: translateY(0);
}

.gmrr-exit-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Spinner icon animation */
.gmrr-exit-spinner svg {
    animation: gmrr-exit-spin 0.8s linear infinite;
}

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

/* ── Decline link ── */
.gmrr-exit-decline {
    display: block;
    width: 100%;
    text-align: center;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 12.5px;
    margin-top: 10px;
    padding: 6px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.15s;
}

.gmrr-exit-decline:hover {
    color: #64748b;
}

/* ── Error message ── */
.gmrr-exit-error {
    margin-top: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13.5px;
    text-align: center;
}

.gmrr-exit-error[hidden] { display: none !important; }

/* ── Success state ── */
.gmrr-exit-success {
    text-align: center;
    padding: 16px 0 8px;
}

.gmrr-exit-success[hidden] { display: none !important; }

.gmrr-exit-success-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    line-height: 1;
}

.gmrr-exit-success h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1e3a5f;
    margin: 0 0 8px;
}

.gmrr-exit-success p {
    color: #475569;
    font-size: 0.9rem;
    margin: 0 0 20px;
    line-height: 1.6;
}

.gmrr-exit-close-btn {
    background: #0e9488;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 28px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.gmrr-exit-close-btn:hover { opacity: 0.88; }

/* ── Responsive ── */
@media (max-width: 540px) {
    .gmrr-exit-card {
        padding: 28px 20px 22px;
        border-radius: 12px;
    }

    .gmrr-exit-form-grid {
        grid-template-columns: 1fr;
    }

    .gmrr-exit-field--full {
        grid-column: 1;
    }

    .gmrr-exit-title {
        font-size: 1.2rem;
    }

    .gmrr-exit-trust {
        gap: 6px;
    }
}
