/**
 * FunnelBridge LITE — frontend modal styles
 *
 * The CSS variables fall back to common WordPress / theme variables first,
 * which is how the modal "inherits" from your theme without configuration.
 * Admin-set colors override these via inline style in PHP.
 */

:root {
    --fblite-primary: var(--wp--preset--color--primary, var(--theme-primary, #0f172a));
    --fblite-primary-contrast: #ffffff;
    --fblite-text: var(--wp--preset--color--foreground, var(--theme-text, #1e293b));
    --fblite-muted: #64748b;
    --fblite-bg: #ffffff;
    --fblite-overlay: rgba(15, 23, 42, 0.55);
    --fblite-radius: 12px;
    --fblite-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.fblite-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    font-family: inherit;
    color: var(--fblite-text);
}

.fblite-modal.is-active {
    display: block;
}

.fblite-modal-overlay {
    position: absolute;
    inset: 0;
    background: var(--fblite-overlay);
    animation: fblite-fade 0.25s ease;
}

.fblite-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--fblite-bg);
    border-radius: var(--fblite-radius);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--fblite-shadow);
    animation: fblite-rise 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.fblite-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: 0;
    font-size: 28px;
    line-height: 1;
    color: var(--fblite-muted);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

.fblite-modal-close:hover,
.fblite-modal-close:focus {
    color: var(--fblite-text);
    background: rgba(15, 23, 42, 0.06);
    outline: none;
}

.fblite-modal-body {
    padding: 40px 32px 32px;
    text-align: center;
}

.fblite-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--fblite-primary);
    color: var(--fblite-primary-contrast);
    border-radius: 50%;
    margin: 0 auto 18px;
    animation: fblite-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fblite-modal-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--fblite-text);
}

.fblite-modal-message {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--fblite-muted);
}

.fblite-modal-actions {
    margin-top: 8px;
}

.fblite-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.fblite-btn-primary {
    background: var(--fblite-primary);
    color: var(--fblite-primary-contrast);
}

.fblite-btn-primary:hover,
.fblite-btn-primary:focus {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
    opacity: 0.95;
    color: var(--fblite-primary-contrast);
}

@keyframes fblite-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fblite-rise {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes fblite-pop {
    0%   { transform: scale(0); }
    60%  { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@media (max-width: 600px) {
    .fblite-modal-content {
        width: 92%;
    }
    .fblite-modal-body {
        padding: 32px 22px 24px;
    }
    .fblite-modal-title {
        font-size: 19px;
    }
}
