
/* ==========================================================
   ASISTENTE FLOTANTE DE SOPORTE
   LT & SOLUTIONS PRO
   Diseño corporativo, moderno y responsive
   ========================================================== */


/* ==========================================================
   1. CONTENEDOR PRINCIPAL DEL ASISTENTE
   ========================================================== */

.support-widget {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    font-family: 'Montserrat', sans-serif;
}


/* ==========================================================
   2. BOTÓN FLOTANTE E INVITACIÓN
   ========================================================== */

.support-launcher {
    display: flex;
    align-items: center;
    gap: 13px;
}

/* Burbuja de invitación */
.support-invitation {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 11px 16px;
    border: 1px solid #E2E8F0;
    border-left: 3px solid #F59E0B;
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: 0 5px 22px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    transition: all 0.3s ease;
}

.support-invitation span {
    color: #0F172A;
    font-size: 12px;
    font-weight: 800;
}

.support-invitation small {
    color: #64748B;
    font-size: 10px;
    font-weight: 500;
}

.support-invitation:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(22, 82, 240, 0.13);
}

/* Botón circular de soporte */

/* ==========================================================
   MEJORA DEL BOTÓN FLOTANTE DE SOPORTE
   Icono de asesor con detalle de WhatsApp
   ========================================================== */

.support-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    background: linear-gradient(135deg, #1652F0, #0F3EB5);
    color: #FFFFFF;
    box-shadow: 0 6px 22px rgba(22, 82, 240, 0.32);
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Icono principal de soporte */
.support-toggle i {
    font-size: 29px;
}

/* Pequeño indicador verde */
.support-toggle::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 17px;
    height: 17px;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    background: #22C55E;
}

/* Efecto al pasar el cursor */
.support-toggle:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 9px 28px rgba(22, 82, 240, 0.42);
}

/* Cuando se abre la ventana, ocultar el indicador verde */
.support-widget.is-open .support-toggle::after {
    display: none;
}

/* Tamaño en dispositivos móviles */
@media (max-width: 767px) {
    .support-toggle {
        width: 62px;
        height: 62px;
    }
}


/* ==========================================================
   3. VENTANA DE ATENCIÓN
   ========================================================== */

.support-window {
    display: none;
    flex-direction: column;
    width: 365px;
    max-width: calc(100vw - 36px);
    overflow: hidden;
    border: 1px solid #E2E8F0;
    border-radius: 18px;
    background: #FFFFFF;
    box-shadow: 0 12px 45px rgba(15, 23, 42, 0.20);
    transform-origin: bottom right;
}

/* Ventana visible al abrir el asistente */
.support-widget.is-open .support-window {
    display: flex;
    animation: supportWindowAppear 0.3s ease;
}

/* Animación de apertura */
@keyframes supportWindowAppear {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* ==========================================================
   4. ENCABEZADO DE LA VENTANA
   ========================================================== */

.support-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    background: linear-gradient(120deg, #1652F0, #0F3EB5);
    color: #FFFFFF;
}

/* Avatar del asesor */
.support-avatar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    background: #FFFFFF;
    color: #1652F0;
}

.support-avatar i {
    font-size: 23px;
}

/* Indicador de disponibilidad */
.support-status {
    position: absolute;
    right: -1px;
    bottom: 1px;
    width: 12px;
    height: 12px;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    background: #22C55E;
}

.support-header-info {
    flex: 1;
    min-width: 0;
}

.support-header-info h3 {
    margin: 0 0 5px;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}

.support-header-info span {
    color: rgba(255, 255, 255, 0.85);
    font-size: 10px;
}

/* Botón de cierre */
.support-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    cursor: pointer;
    transition: background 0.25s ease;
}

.support-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.support-close i {
    font-size: 14px;
}


/* ==========================================================
   CONTROL DE ICONOS DEL BOTÓN FLOTANTE
   ========================================================== */

/* Estado normal: mostrar solamente auriculares */
.support-toggle .support-icon-open {
    display: block;
}

.support-toggle .support-icon-close {
    display: none;
}

/* Estado abierto: mostrar solamente la X */
.support-widget.is-open .support-toggle .support-icon-open {
    display: none;
}

.support-widget.is-open .support-toggle .support-icon-close {
    display: block;
}



/* ==========================================================
   5. CUERPO Y MENSAJE DE BIENVENIDA
   ========================================================== */

.support-body {
    padding: 22px 20px 20px;
    background: #FFFFFF;
}

.support-welcome {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #E5EDFC;
    border-radius: 12px;
    background: #F1F6FF;
}

.support-welcome h4 {
    margin: 0 0 9px;
    color: #0F172A;
    font-size: 16px;
    font-weight: 800;
}

.support-welcome p {
    margin: 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.7;
}

.support-welcome .support-instruction {
    margin-top: 9px;
    color: #64748B;
    font-size: 11px;
}


/* ==========================================================
   6. FORMULARIO Y ÁREA DE ESCRITURA
   ========================================================== */

.support-form {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.support-form label {
    color: #0F172A;
    font-size: 12px;
    font-weight: 800;
}

.support-form textarea {
    display: block;
    width: 100%;
    min-height: 105px;
    padding: 13px;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    outline: none;
    background: #FFFFFF;
    color: #0F172A;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.support-form textarea::placeholder {
    color: #94A3B8;
}

.support-form textarea:focus {
    border-color: #1652F0;
    box-shadow: 0 0 0 3px rgba(22, 82, 240, 0.10);
}


/* ==========================================================
   7. BOTÓN DE ENVÍO POR WHATSAPP
   ========================================================== */

.support-send {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 47px;
    padding: 12px 15px;
    border: none;
    border-radius: 9px;
    background: #16A34A;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
}

.support-send i {
    font-size: 19px;
}

.support-send:hover {
    background: #15803D;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(22, 163, 74, 0.20);
}

.support-note {
    color: #94A3B8;
    font-size: 9px;
    line-height: 1.5;
    text-align: center;
}


/* ==========================================================
   8. TABLET Y MÓVILES
   ========================================================== */

@media (max-width: 767px) {

    .support-widget {
        right: 16px;
        bottom: 16px;
        gap: 12px;
    }

    .support-toggle {
        width: 58px;
        height: 58px;
    }

    .support-window {
        width: 350px;
    }

}


/* ==========================================================
   9. MÓVILES PEQUEÑOS
   ========================================================== */

@media (max-width: 380px) {

    .support-widget {
        right: 12px;
        bottom: 12px;
    }

    .support-window {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
    }

    .support-header {
        padding: 15px;
    }

    .support-body {
        padding: 16px;
    }

    .support-invitation {
        padding: 9px 12px;
    }

}
