/* WLC – WhatsApp Lead Capture | frontend.css
   Self-contained: funciona em qualquer tema WordPress.
   Prefixo .wlc- isola completamente do tema host. */

/* ── FAB Button ──────────────────────────────────────────── */
.wlc-fab {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: .6rem;
    background: #25d366;
    color: #fff;
    text-decoration: none;
    padding: .75rem 1.2rem .75rem .9rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(37,211,102,.45), 0 2px 8px rgba(0,0,0,.18);
    transition: transform .2s ease, box-shadow .2s ease;
    animation: wlcFabPop .5s cubic-bezier(.34,1.56,.64,1) .8s both;
    -webkit-tap-highlight-color: transparent;
}
.wlc-fab:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 28px rgba(37,211,102,.55), 0 4px 12px rgba(0,0,0,.2);
    color: #fff;
}
.wlc-fab svg { width: 24px; height: 24px; flex-shrink: 0; }
.wlc-fab-label {
    font-size: .85rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: .01em;
}

/* Pulse ring */
.wlc-fab::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    background: #25d366;
    animation: wlcFabPulse 2.8s ease-out 1.5s infinite;
    z-index: -1;
}
@keyframes wlcFabPop {
    from { opacity: 0; transform: scale(.5) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes wlcFabPulse {
    0%  { transform: scale(1);    opacity: .6; }
    70% { transform: scale(1.35); opacity: 0; }
    100%{ transform: scale(1.35); opacity: 0; }
}

/* Mobile: icon only */
@media (max-width: 479px) {
    .wlc-fab-label { display: none; }
    .wlc-fab { padding: 1rem; bottom: 1.25rem; right: 1.25rem; }
}

/* ── Modal Overlay ───────────────────────────────────────── */
.wlc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10100;
    background: rgba(6,18,42,.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.wlc-overlay.wlc-open {
    display: flex;
    animation: wlcFadeIn .2s ease both;
}
@keyframes wlcFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Modal Box ───────────────────────────────────────────── */
.wlc-modal-box {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    padding: 2.5rem 2rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 64px rgba(6,18,42,.35), 0 0 0 1px rgba(201,168,76,.12);
    text-align: center;
    animation: wlcSlideUp .28s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes wlcSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Close button */
.wlc-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: .25rem .5rem;
    border-radius: 6px;
    transition: color .15s, background .15s;
}
.wlc-close:hover { color: #0a1f44; background: #f1f5f9; }

/* Icon */
.wlc-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(37,211,102,.12);
    margin-bottom: 1rem;
}
.wlc-icon-wrap svg { width: 30px; height: 30px; color: #25d366; }

/* Title */
.wlc-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0a1f44;
    margin: 0 0 .4rem;
    line-height: 1.2;
}
.wlc-subtitle {
    font-size: .9rem;
    color: #64748b;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

/* ── Form Fields ─────────────────────────────────────────── */
.wlc-field {
    text-align: left;
    margin-bottom: 1rem;
}
.wlc-field label {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    color: #0a1f44;
    margin-bottom: .35rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-family: inherit;
}
.wlc-field input {
    width: 100%;
    padding: .78rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem; /* ≥16px — previne zoom automático iOS */
    color: #0a1f44;
    background: #f8fafc;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    box-sizing: border-box;
    font-family: inherit;
}
.wlc-field input:focus {
    border-color: #00bfcf;
    box-shadow: 0 0 0 3px rgba(0,191,207,.15);
    background: #fff;
}
.wlc-field input.wlc-field-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

/* Error messages */
.wlc-error {
    display: none;
    font-size: .78rem;
    color: #ef4444;
    margin-top: .3rem;
    font-family: inherit;
}

/* Submit button */
.wlc-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .9rem 1.5rem;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: .5rem;
    transition: filter .18s, transform .18s;
    font-family: inherit;
    min-height: 48px;
}
.wlc-submit-btn:hover  { filter: brightness(1.08); transform: translateY(-1px); }
.wlc-submit-btn:active { transform: translateY(0); }
.wlc-submit-btn:disabled { opacity: .65; cursor: not-allowed; }
.wlc-submit-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Privacy */
.wlc-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    font-size: .74rem;
    color: #94a3b8;
    margin: 1rem 0 0;
    line-height: 1.4;
    font-family: inherit;
}
.wlc-privacy svg { width: 12px; height: 12px; flex-shrink: 0; color: #94a3b8; }

/* ── Mobile bottom sheet ─────────────────────────────────── */
@media (max-width: 639px) {
    .wlc-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .wlc-modal-box {
        border-radius: 20px 20px 0 0;
        padding: 2rem 1.25rem 2.5rem;
        max-width: 100%;
        animation: wlcSlideUpMobile .3s cubic-bezier(.32,.72,0,1) both;
    }
    /* Pull indicator */
    .wlc-modal-box::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: rgba(10,31,68,.12);
        border-radius: 2px;
        margin: 0 auto .75rem;
    }
    @keyframes wlcSlideUpMobile {
        from { transform: translateY(100%); opacity: .8; }
        to   { transform: translateY(0);    opacity: 1; }
    }
    .wlc-title  { font-size: 1.25rem; }
    .wlc-subtitle { font-size: .85rem; margin-bottom: 1.25rem; }
}
