/* -- Overlay -- */

.wpbag-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2147483647; /* max int — sits above everything including admin bar */
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    transition: background 0.4s ease, backdrop-filter 0.4s ease, -webkit-backdrop-filter 0.4s ease;
}

.wpbag-overlay.wpbag-visible {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* -- Modal -- */

.wpbag-modal {
    margin: 0 auto;
    text-align: center;
    background: #fff;
    max-width: 480px;
    width: 90%;
    padding: 48px 40px 40px;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    transition-delay: 0.1s;
}

.wpbag-visible .wpbag-modal {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* -- Logo -- */

.wpbag-logo {
    max-width: 220px;
    height: auto;
    margin-bottom: 24px;
}

/* -- Typography -- */

.wpbag-title {
    color: var(--wpbag-title, #000);
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.wpbag-description {
    margin: 0 0 28px;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* -- Buttons -- */

.wpbag-buttons {
    display: flex;
    justify-content: center;
}

.wpbag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 32px;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 8px;
    line-height: 1;
    letter-spacing: 0.01em;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.wpbag-btn:active {
    transform: scale(0.97);
}

/* Yes / primary — hero CTA */

.wpbag-btn--yes {
    background: var(--wpbag-primary, #ff6c2d);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.wpbag-btn--yes:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.wpbag-btn:focus-visible {
    outline: 2px solid var(--wpbag-primary, #ff6c2d);
    outline-offset: 3px;
}

/* No / subtle text link */

.wpbag-no-link {
    display: block;
    margin: 16px auto 0;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px;
    transition: color 0.2s ease;
}

.wpbag-no-link:hover {
    color: #666;
}

.wpbag-no-link:focus-visible {
    outline: 2px solid var(--wpbag-primary, #ff6c2d);
    outline-offset: 3px;
}

/* Rejection message */

.wpbag-reject__msg {
    margin: 16px 0 0;
    color: #999;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* -- Success screen -- */

.wpbag-success {
    padding: 10px 0;
}

.wpbag-continue {
    margin-top: 15px;
    background: none;
    border: none;
    color: var(--wpbag-primary, #ff6c2d);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.wpbag-continue:hover {
    opacity: 0.75;
}

.wpbag-continue:focus-visible {
    outline: 2px solid var(--wpbag-primary, #ff6c2d);
    outline-offset: 3px;
}

/* -- Responsive -- */

@media (max-width: 600px) {
    .wpbag-modal {
        padding: 32px 24px 28px;
        border-radius: 12px;
        width: 92%;
    }

    .wpbag-logo {
        max-width: 180px;
    }

    .wpbag-title {
        font-size: 1.25rem;
    }

    .wpbag-btn {
        min-height: 48px; /* Apple HIG / Material minimum tap target */
    }
}

@media (max-width: 360px) {
    .wpbag-modal {
        padding: 24px 16px 20px;
        width: 96%;
    }

    .wpbag-logo {
        max-width: 150px;
    }

    .wpbag-title {
        font-size: 1.1rem;
    }

    .wpbag-description {
        font-size: 0.875rem;
    }
}
