/* =========================================
   WEBLAB WHATSAPP LEADS
   Widget flotante
========================================= */

#wwl-widget,
#wwl-widget * {
    box-sizing: border-box;
}

#wwl-widget {
    position: fixed;
    bottom: 24px;
    z-index: 999999;
    font-family: Arial, Helvetica, sans-serif;
}

/* =========================================
   BOTÓN FLOTANTE
========================================= */

#wwl-widget .wwl-floating-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;

    height: 62px !important;
    min-height: 62px !important;
    max-height: 62px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 999px !important;

    background: var(--wwl-primary-color, #25d366) !important;
    background-image: none !important;

    color: #ffffff !important;
    cursor: pointer !important;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;

    appearance: none !important;
    -webkit-appearance: none !important;

    line-height: 1 !important;
    text-decoration: none !important;

    overflow: hidden !important;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

#wwl-widget .wwl-floating-button::before,
#wwl-widget .wwl-floating-button::after {
    display: none !important;
    content: none !important;
}

#wwl-widget .wwl-floating-button:hover,
#wwl-widget .wwl-floating-button:focus,
#wwl-widget .wwl-floating-button:active {
    width: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;

    height: 62px !important;
    min-height: 62px !important;
    max-height: 62px !important;

    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;

    background: var(--wwl-primary-color, #25d366) !important;
    background-image: none !important;
    color: #ffffff !important;

    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3) !important;
}

#wwl-widget .wwl-floating-button:focus-visible {
    outline: 3px solid rgba(37, 211, 102, 0.35) !important;
    outline-offset: 3px;
}

#wwl-widget .wwl-floating-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 32px !important;
    height: 32px !important;

    margin: 0 !important;
    padding: 0 !important;

    line-height: 1 !important;
    transform: none !important;
}

#wwl-widget .wwl-floating-icon svg {
    display: block !important;

    width: 31px !important;
    height: 31px !important;

    margin: 0 !important;
    padding: 0 !important;

    fill: currentColor !important;
}

/* =========================================
   PANEL DEL CHAT
========================================= */

#wwl-widget .wwl-chat-panel {
    position: absolute;
    bottom: 78px;

    width: 360px;
    max-width: calc(100vw - 32px);

    overflow: hidden;

    border-radius: 18px;
    background: #ffffff;

    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.25);
}

#wwl-widget .wwl-chat-panel[hidden] {
    display: none !important;
}

/* =========================================
   ENCABEZADO
========================================= */

#wwl-widget .wwl-chat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;

    padding: 20px;

    background: var(--wwl-primary-color, #075e54);
    color: #ffffff;
}

#wwl-widget .wwl-chat-header strong {
    display: block;

    margin-bottom: 5px;

    color: #ffffff;
    font-size: 18px;
    line-height: 1.25;
}

#wwl-widget .wwl-chat-header span {
    display: block;

    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    line-height: 1.4;
}

#wwl-widget .wwl-close-button {
    flex: 0 0 auto;

    width: 32px;
    height: 32px;

    padding: 0;
    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;
}

#wwl-widget .wwl-close-button:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* =========================================
   CUERPO
========================================= */

#wwl-widget .wwl-chat-body {
    max-height: 70vh;
    overflow-y: auto;

    padding: 20px;

    background: #efeae2;
}

#wwl-widget .wwl-chat-message {
    position: relative;

    margin-bottom: 18px;
    padding: 13px 15px;

    border-radius: 5px 14px 14px 14px;

    background: #ffffff;
    color: #263238;

    font-size: 14px;
    line-height: 1.5;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* =========================================
   FORMULARIO
========================================= */

#wwl-widget .wwl-form {
    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 16px;
    border-radius: 14px;

    background: #ffffff;
}

#wwl-widget .wwl-form label {
    margin-top: 5px;

    color: #263238;

    font-size: 13px;
    font-weight: 600;
}

#wwl-widget .wwl-form input,
#wwl-widget .wwl-form textarea {
    display: block;

    width: 100%;
    margin: 0;
    padding: 11px 12px;

    border: 1px solid #d7d7d7;
    border-radius: 9px;

    background: #ffffff;
    color: #222222;

    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;

    outline: none;
}

#wwl-widget .wwl-form textarea {
    min-height: 95px;
    resize: vertical;
}

#wwl-widget .wwl-form input:focus,
#wwl-widget .wwl-form textarea:focus {
    border-color: var(--wwl-primary-color, #25d366);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.14);
}

#wwl-widget .wwl-submit-button {
    width: 100%;

    margin-top: 10px;
    padding: 13px 16px;

    border: 0;
    border-radius: 9px;

    background: var(--wwl-primary-color, #25d366);
    color: #ffffff;

    font-family: inherit;
    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition:
        filter 0.2s ease,
        transform 0.2s ease;
}

#wwl-widget .wwl-submit-button:hover {
    filter: brightness(0.92);
    transform: translateY(-1px);
}

/* =========================================
   POSICIÓN CONFIGURABLE
========================================= */

#wwl-widget.wwl-position-right {
    right: 24px;
    left: auto;
}

#wwl-widget.wwl-position-left {
    right: auto;
    left: 24px;
}

#wwl-widget.wwl-position-right .wwl-chat-panel {
    right: 0;
    left: auto;
}

#wwl-widget.wwl-position-left .wwl-chat-panel {
    right: auto;
    left: 0;
}

/* =========================================
   VISIBILIDAD POR DISPOSITIVO
========================================= */

@media only screen and (min-width: 601px) {
    #wwl-widget.wwl-hide-desktop {
        display: none !important;
    }
}

@media only screen and (max-width: 600px) {
    #wwl-widget.wwl-hide-mobile {
        display: none !important;
    }

    #wwl-widget {
        bottom: 16px;
    }

    #wwl-widget.wwl-position-right {
        right: 16px;
        left: auto;
    }

    #wwl-widget.wwl-position-left {
        right: auto;
        left: 16px;
    }

    #wwl-widget .wwl-floating-button,
    #wwl-widget .wwl-floating-button:hover,
    #wwl-widget .wwl-floating-button:focus,
    #wwl-widget .wwl-floating-button:active {
        width: 56px !important;
        min-width: 56px !important;
        max-width: 56px !important;

        height: 56px !important;
        min-height: 56px !important;
        max-height: 56px !important;

        border-radius: 999px !important;
    }

    #wwl-widget .wwl-chat-panel {
        position: fixed;

        right: 12px !important;
        bottom: 84px;
        left: 12px !important;

        width: auto;
        max-width: none;
    }

    #wwl-widget .wwl-chat-body {
        max-height: 65vh;
    }
}
/* =========================================
   COLOR CONFIGURABLE PROTEGIDO DEL TEMA
========================================= */

#wwl-widget .wwl-chat-header {
    background: var(--wwl-primary-color, #25d366) !important;
    background-color: var(--wwl-primary-color, #25d366) !important;
}

#wwl-widget .wwl-floating-button,
#wwl-widget .wwl-floating-button:hover,
#wwl-widget .wwl-floating-button:focus,
#wwl-widget .wwl-floating-button:active {
    background: var(--wwl-primary-color, #25d366) !important;
    background-color: var(--wwl-primary-color, #25d366) !important;
    border-color: var(--wwl-primary-color, #25d366) !important;
    color: #ffffff !important;
}

#wwl-widget .wwl-submit-button,
#wwl-widget .wwl-submit-button:hover,
#wwl-widget .wwl-submit-button:focus,
#wwl-widget .wwl-submit-button:active {
    background: var(--wwl-primary-color, #25d366) !important;
    background-color: var(--wwl-primary-color, #25d366) !important;
    border: 1px solid var(--wwl-primary-color, #25d366) !important;
    color: #ffffff !important;
}

#wwl-widget .wwl-close-button,
#wwl-widget .wwl-close-button:hover,
#wwl-widget .wwl-close-button:focus,
#wwl-widget .wwl-close-button:active {
    background: rgba(255, 255, 255, 0.18) !important;
    border: 0 !important;
    color: #ffffff !important;
}

#wwl-widget .wwl-form input:focus,
#wwl-widget .wwl-form textarea:focus {
    border-color: var(--wwl-primary-color, #25d366) !important;
    box-shadow: 0 0 0 3px color-mix(
        in srgb,
        var(--wwl-primary-color, #25d366) 18%,
        transparent
    ) !important;
}