/* ============================================================
   WhatsApp Lead — widget.css  v2.0.0
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

/* 1. Contenedor principal */
#wal-wrapper {
    position: fixed;
    bottom: 25px;
    z-index: 99999999;
    font-family: 'Montserrat', sans-serif;
    max-width: 320px;
}

/* Posición izquierda (default) */
#wal-wrapper.wal-left {
    left: 25px;
}

/* Posición derecha */
#wal-wrapper.wal-right {
    right: 25px;
}

/* 2. Botón flotante (FAB) */
#wal-fab {
    background-color: #25d366;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-weight: 700;
    font-size: 14px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    font-family: 'Montserrat', sans-serif;
}

#wal-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

#wal-fab:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

#wal-fab.wal-hidden {
    display: none;
}

#wal-fab svg {
    flex-shrink: 0;
}

/* 3. Popup */
#wal-popup {
    display: none;
    width: 320px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
    animation: wal-slide-up 0.25s ease;
}

@keyframes wal-slide-up {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

#wal-popup.wal-visible {
    display: block;
}

/* Cabecera */
.wal-header {
    background-color: #075e54;
    padding: 14px 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 54px;
}

.wal-close {
    color: white;
    background: transparent;
    border: none;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    font-weight: 300;
    opacity: 0.85;
    transition: opacity 0.2s;
    border-radius: 4px;
}

.wal-close:hover    { opacity: 1; }
.wal-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Cuerpo */
.wal-body {
    padding: 24px 20px 18px;
    text-align: center;
}

.wal-body h3 {
    color: #075e54;
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.wal-body > p {
    font-size: 13px;
    color: #666;
    margin: 0 0 18px;
    line-height: 1.4;
}

/* 4. Formulario nativo dinámico */
#wal-form-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wal-field-input {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    color: #333;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.2s, background 0.2s;
}

.wal-field-input:focus {
    outline: none;
    border-color: #075e54;
    background: white;
}

#wal-submit {
    background-color: #075e54;
    color: white;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    padding: 14px;
    width: 100%;
    cursor: pointer;
    font-size: 15px;
    margin-top: 4px;
    transition: background-color 0.3s ease, transform 0.2s;
    font-family: 'Montserrat', sans-serif;
}

#wal-submit:hover { background-color: #064e45; transform: translateY(-1px); }
#wal-submit:focus-visible { outline: 3px solid #25d366; outline-offset: 2px; }

.wal-error {
    font-size: 12px;
    color: #dc3545;
    background: #fff3f3;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 8px 10px;
    text-align: left;
}

/* 5. Copyright */
.wal-copyright {
    font-size: 10px;
    color: #bbb;
    margin: 14px 0 0;
    text-align: center;
}

/* 6. Responsive */
@media (max-width: 380px) {
    #wal-wrapper.wal-left  { left: 12px; }
    #wal-wrapper.wal-right { right: 12px; }
    #wal-popup { width: calc(100vw - 24px); }
}
