/**
 * Estilos do Modal — WP Lead Gate Download (Frontend)
 *
 * @package WpLeadGateDownload
 * @author  Blue MKT <https://bluesocialmediamkt.com.br/>
 * @version 1.0.2
 */

/* ─── Google Font ───────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ─── Trigger Button ───────────────────────────── */
.wlgd-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, filter .2s;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    letter-spacing: .3px;
}

.wlgd-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .22);
    filter: brightness(1.08);
}

.wlgd-button:active {
    transform: translateY(0);
}

/* ─── Inline link ───────────────────────────────── */
.wlgd-inline-link {
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    text-underline-offset: 2px;
}

.wlgd-inline-link:hover {
    opacity: .75;
}

/* ─── Overlay ────────────────────────────────────── */
/*
 * Renderizado via wp_footer (direto no body).
 * !important e transform:none neutralizam stacking
 * context criado por temas com transform/filter.
 */
.wlgd-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 20px;
    z-index: 2147483647;
    background: rgba(0, 0, 0, .65) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: wlgdFadeIn .25s ease;
    transform: none !important;
    will-change: auto !important;
}

.wlgd-overlay[hidden] {
    display: none !important;
}

@keyframes wlgdFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ─── Modal Box ──────────────────────────────────── */
.wlgd-modal {
    position: relative;
    width: 100%;
    max-width: 460px;
    border-radius: 16px;
    padding: 36px 36px 30px;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
    animation: wlgdSlideUp .3s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes wlgdSlideUp {
    from {
        opacity: 0;
        transform: translateY(32px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ─── Close Button ───────────────────────────────── */
button#wlgd-close-modal.wlgd-close {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    color: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    transition: background .2s, transform .2s !important;
}

button#wlgd-close-modal.wlgd-close:hover {
    background: rgba(0, 0, 0, .08) !important;
    transform: rotate(90deg) !important;
}

button#wlgd-close-modal.wlgd-close svg {
    width: 14px !important;
    height: 14px !important;
    display: block !important;
}

/* ─── Modal Icon ─────────────────────────────────── */
.wlgd-modal-icon {
    text-align: center;
    margin-bottom: 12px;
}

/* ─── Modal Title / Desc ─────────────────────────── */
.wlgd-modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 8px;
    letter-spacing: -.2px;
}

.wlgd-modal-desc {
    font-size: .9rem;
    text-align: center;
    margin: 0 0 20px;
    opacity: .8;
    line-height: 1.5;
}

/* ─── Form Fields ────────────────────────────────── */
.wlgd-field {
    margin-bottom: 14px;
}

.wlgd-field label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 5px;
    opacity: .85;
}

.wlgd-field input[type="text"],
.wlgd-field input[type="email"],
.wlgd-field input[type="tel"] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid rgba(0, 0, 0, .15);
    border-radius: 7px;
    font-family: 'Inter', sans-serif;
    font-size: .9rem;
    background: rgba(255, 255, 255, .8);
    color: #1d2327;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.wlgd-field input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, .15);
}

.wlgd-field input.wlgd-error {
    border-color: #d63638;
}

.wlgd-field-error {
    display: block;
    font-size: .75rem;
    color: #d63638;
    margin-top: 4px;
    min-height: 16px;
}

/* ─── GDPR ───────────────────────────────────────── */
.wlgd-gdpr-field {
    margin-bottom: 18px;
}

.wlgd-gdpr-label {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
    font-size: .8rem !important;
    font-weight: 400 !important;
    cursor: pointer;
}

.wlgd-gdpr-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #0073aa;
}

.wlgd-gdpr-label a {
    color: #0073aa;
}

/* ─── Submit Button ──────────────────────────────── */
.wlgd-submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: filter .2s, transform .2s;
    letter-spacing: .3px;
}

.wlgd-submit-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.wlgd-submit-btn:disabled {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
}

/* ─── Spinner ────────────────────────────────────── */
.wlgd-btn-spinner {
    animation: wlgdSpin 1s linear infinite;
}

@keyframes wlgdSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── Form message ───────────────────────────────── */
.wlgd-form-message {
    font-size: .85rem;
    text-align: center;
    margin-bottom: 10px;
    min-height: 20px;
}

.wlgd-form-message.success {
    color: #0a6b0a;
    font-weight: 600;
}

.wlgd-form-message.error {
    color: #d63638;
}

/* ─── ReCAPTCHA ──────────────────────────────────── */
.grecaptcha-badge {
    visibility: hidden !important;
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 500px) {
    .wlgd-modal {
        padding: 28px 20px 22px;
        border-radius: 12px;
    }

    .wlgd-modal-title {
        font-size: 1.15rem;
    }
}