
/* ========================================
   ALORESERVAS — ASISTENTE ALO
   Diseño visual del chatbot
   ======================================== */

:root {
    --alo-turquesa: #199B8A;
    --alo-turquesa-oscuro: #127D70;
    --alo-azul: #1F3C88;
    --alo-fondo: #F4F8FA;
    --alo-blanco: #FFFFFF;
    --alo-texto: #263445;
    --alo-texto-suave: #718096;
    --alo-borde: #E4EBF0;
    --alo-sombra: 0 18px 55px rgba(24, 47, 75, 0.18);
}

/* Ajustes generales */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Arial, sans-serif;
    color: var(--alo-texto);
    background: var(--alo-fondo);
}

/* Página de presentación */

.pagina-alo {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background:
        radial-gradient(
            circle at top right,
            rgba(25, 155, 138, 0.13),
            transparent 38%
        ),
        linear-gradient(135deg, #F4F8FA, #FFFFFF);
}

.contenido-alo {
    width: 100%;
    max-width: 650px;
    text-align: center;
}

.logo-alo {
    display: block;
    width: 220px;
    max-width: 75%;
    height: auto;
    object-fit: contain;
    margin: 0 auto 35px;
}

.etiqueta-alo {
    margin: 0 0 12px;
    color: var(--alo-turquesa-oscuro);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 3px;
}

.contenido-alo h1 {
    margin: 0 0 18px;
    color: var(--alo-azul);
    font-size: clamp(38px, 7vw, 62px);
    font-weight: 750;
    letter-spacing: -2px;
    text-align: centre;
}

.descripcion-alo {
    width: 100%;
    max-width: 510px;
    margin: 0 auto;
    color: var(--alo-texto-suave);
    font-size: 18px;
    line-height: 1.8;
    text-align: center;
}

.indicacion-alo {
    margin: 28px auto 0;
    color: var(--alo-turquesa-oscuro);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

/* Boton flotante  de Alo */

.alo-boton-flotante {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    min-height: 68px;
    padding: 10px 22px;

    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    background: linear-gradient(135deg, #199B8A, #168C7D);
    color: #FFFFFF;

    font-family: "Inter", Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;

    box-shadow:
        0 8px 24px rgba(25, 155, 138, 0.28),
        0 2px 6px rgba(16, 41, 79, 0.10);

    transition:
        background 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.alo-boton-flotante:hover {
    background: linear-gradient(135deg, #168C7D, #127D70);
    transform: translateY(-3px);
    box-shadow:
        0 12px 30px rgba(25, 155, 138, 0.36),
        0 0 0 4px rgba(25, 155, 138, 0.09);
}

.alo-boton-flotante:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 5px 14px rgba(25, 155, 138, 0.25);
}

.alo-icono-boton {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 27px;
    line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
    .alo-boton-flotante {
        transition: none;
    }

    .alo-boton-flotante:hover,
    .alo-boton-flotante:active {
        transform: none;
    }
}

.alo-boton-flotante:focus-visible,
.alo-cerrar:focus-visible,
.alo-enviar:focus-visible {
    outline: 3px solid var(--alo-azul);
    outline-offset: 4px;
}

/* Texto principal y subtítulo del botón */

.alo-texto-boton-contenido {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    line-height: 1.2;
}

#alo-texto-boton {
    display: block;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.1px;
}

#alo-subtexto-boton {
    display: block;
    font-size: 11px;
    font-weight: 400;
    opacity: 0.9;
    letter-spacing: 0.15px;
}

/* Ventana principal del chat */

.alo-ventana {
    position: fixed;
    right: 26px;
    bottom: 105px;
    z-index: 999;

    display: flex;
    flex-direction: column;

    width: 390px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100dvh - 135px);

    overflow: hidden;
    border: 1px solid var(--alo-borde);
    border-radius: 22px;
    background: var(--alo-blanco);
    box-shadow: var(--alo-sombra);
}

.alo-ventana[hidden] {
    display: none !important;
}

/* Cabecera del chat */

.alo-cabecera {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 19px 18px;
    color: var(--alo-blanco);
    background: linear-gradient(
        135deg,
        var(--alo-turquesa),
        var(--alo-azul)
    );
}

.alo-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 46px;
    height: 46px;
    border: 2px solid rgba(255, 255, 255, 0.65);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.17);
    font-size: 23px;
}

.alo-cabecera-texto {
    flex: 1;
    min-width: 0;
}

.alo-cabecera h2 {
    margin: 0 0 5px;
    font-size: 18px;
    font-weight: 750;
}

.alo-estado {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 12px;
    opacity: 0.92;
}

.alo-punto-estado {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8DFFCA;
}

.alo-cerrar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    color: var(--alo-blanco);
    background: rgba(255, 255, 255, 0.15);
    font-size: 25px;
    cursor: pointer;
}

.alo-cerrar:hover {
    background: rgba(255, 255, 255, 0.27);
}

/* Área de conversación */

.alo-mensajes {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 14px;

    min-height: 0;
    overflow-y: auto;
    padding: 22px 16px;

    background: var(--alo-fondo);
    scroll-behavior: smooth;
}

.alo-mensaje {
    max-width: 88%;
    padding: 13px 15px;
    border-radius: 17px;

    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.alo-mensaje-asistente {
    align-self: flex-start;
    border: 1px solid var(--alo-borde);
    border-bottom-left-radius: 5px;
    color: var(--alo-texto);
    background: var(--alo-blanco);
}

.alo-mensaje-usuario {
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    color: var(--alo-blanco);
    background: var(--alo-turquesa);
}

/* Sugerencias de preguntas */

.alo-sugerencias {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 15px;
    background: var(--alo-blanco);
}

.alo-sugerencia {
    padding: 9px 12px;
    border: 1px solid rgba(25, 155, 138, 0.45);
    border-radius: 18px;
    color: var(--alo-turquesa-oscuro);
    background: var(--alo-blanco);

    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.alo-sugerencia:hover {
    background: rgba(25, 155, 138, 0.09);
}

/* Formulario para enviar mensajes */

.alo-formulario {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 14px;
    border-top: 1px solid var(--alo-borde);
    background: var(--alo-blanco);
}

.alo-entrada {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 15px;

    border: 1px solid var(--alo-borde);
    border-radius: 24px;
    outline: none;

    color: var(--alo-texto);
    background: var(--alo-fondo);
    font: inherit;
    font-size: 14px;
}

.alo-entrada:focus {
    border-color: var(--alo-turquesa);
    box-shadow: 0 0 0 3px rgba(25, 155, 138, 0.12);
}

.alo-enviar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;

    color: var(--alo-blanco);
    background: var(--alo-turquesa);
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.alo-enviar:hover {
    background: var(--alo-turquesa-oscuro);
}

.alo-pie {
    padding: 0 12px 12px;
    color: var(--alo-texto-suave);
    background: var(--alo-blanco);
    text-align: center;
    font-size: 10px;
}

/* Adaptación a móviles */

@media (max-width: 480px) {
    .alo-boton-flotante {
        right: 16px;
        bottom: 16px;
        min-height: 56px;
        padding: 0 18px;
    }

    .alo-ventana {
        right: 12px;
        bottom: 84px;
        width: calc(100vw - 24px);
        max-width: none;
        height: min(590px, calc(100dvh - 105px));
        max-height: none;
        border-radius: 19px;
    }

    .alo-mensajes {
        padding: 17px 12px;
    }

    .contenido-alo h1 {
        letter-spacing: -1px;
    }

    .descripcion-alo {
        font-size: 16px;
    }
}

/* Idioma árabe: dirección de lectura */

html[dir="rtl"] .alo-mensajes,
html[dir="rtl"] .alo-formulario {
    direction: rtl;
}

html[dir="rtl"] .alo-mensaje-asistente {
    align-self: flex-start;
}

html[dir="rtl"] .alo-mensaje-usuario {
    align-self: flex-end;
}

html[dir="rtl"] .alo-boton-flotante {
    right: auto;
    left: 26px;
}

html[dir="rtl"] .alo-ventana {
    right: auto;
    left: 26px;
}

@media (max-width: 480px) {
    html[dir="rtl"] .alo-boton-flotante {
        left: 16px;
    }

    html[dir="rtl"] .alo-ventana {
        left: 12px;
    }
}


/* Enlace Inicio del Centro de ayuda */

header a[data-i18n="home"] {
    color: #1F3C88;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    font-family: "Inter", Arial, sans-serif;
    transition: color 0.2s ease;
}

header a[data-i18n="home"]:hover {
    color: #199B8A;
    text-decoration: none;
}
