/* ORCH WhatsApp Leads – botão flutuante + diálogo de captura */

#orch-wa-widget {
    --owa-color: #25D366;
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99990;
    font-family: inherit;
}

/* Esconde o botão flutuante antigo do tema (ACF link_whatsapp) para
   não duplicar com o widget do plugin */
.whatsapp-fixed-footer {
    display: none !important;
}

/* ── FAB ── */
.orch-wa-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 50%;
    background: var(--owa-color);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.orch-wa-fab:hover,
.orch-wa-fab:focus-visible {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.orch-wa-fab svg {
    display: block;
}

/* Pulso sutil para chamar atenção */
@keyframes orch-wa-pulse {
    0%   { box-shadow: 0 4px 16px rgba(0,0,0,.25), 0 0 0 0 rgba(37, 211, 102, 0.45); }
    70%  { box-shadow: 0 4px 16px rgba(0,0,0,.25), 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 4px 16px rgba(0,0,0,.25), 0 0 0 0 rgba(37, 211, 102, 0); }
}

#orch-wa-widget:not(.orch-wa-open) .orch-wa-fab {
    animation: orch-wa-pulse 2.5s infinite;
}

@media (prefers-reduced-motion: reduce) {
    #orch-wa-widget .orch-wa-fab {
        animation: none;
        transition: none;
    }
}

/* ── Overlay ── */
.orch-wa-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99991;
}

/* ── Diálogo ── */
.orch-wa-dialog {
    position: fixed;
    right: 24px;
    bottom: 96px;
    width: 340px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    z-index: 99992;
    animation: orch-wa-slide-up 0.25s ease;
}

@keyframes orch-wa-slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.orch-wa-dialog-header {
    background: var(--owa-color);
    color: #fff;
    padding: 20px 44px 16px 20px;
    border-radius: 16px 16px 0 0;
}

.orch-wa-dialog-header h3 {
    margin: 0 0 4px;
    font-size: 18px;
    line-height: 1.3;
    color: #fff;
}

.orch-wa-dialog-header p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.orch-wa-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.orch-wa-close:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* ── Formulário ── */
#orch-wa-form {
    padding: 16px 20px 20px;
}

.orch-wa-field {
    margin-bottom: 14px;
}

.orch-wa-field label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.orch-wa-field label small {
    font-weight: 400;
    color: #888;
}

.orch-wa-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    background: #fff;
    color: #1a1a2e;
}

.orch-wa-field input:focus {
    outline: none;
    border-color: var(--owa-color);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.orch-wa-field input.orch-wa-invalid {
    border-color: #c0392b;
}

.orch-wa-error {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #c0392b;
}

/* Honeypot fora da tela */
.orch-wa-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.orch-wa-submit {
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 8px;
    background: var(--owa-color);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.orch-wa-submit:hover {
    filter: brightness(0.92);
}

/* ── Mobile ── */
@media (max-width: 480px) {
    #orch-wa-widget {
        right: 16px;
        bottom: 16px;
    }

    .orch-wa-dialog {
        right: 16px;
        left: 16px;
        width: auto;
        bottom: 88px;
    }
}
