/*
|--------------------------------------------------------------------------
| ASISTENTE CENTRAL
|--------------------------------------------------------------------------
*/

.central-chatbot {
    --chatbot-primary: #123b66;
    --chatbot-primary-dark: #0b2948;
    --chatbot-primary-soft: #eaf2fa;
    --chatbot-accent: #d5a62f;
    --chatbot-accent-dark: #b4871f;

    --chatbot-text: #1f2937;
    --chatbot-text-soft: #6b7280;
    --chatbot-border: #dfe7ef;
    --chatbot-bg: #ffffff;
    --chatbot-bg-soft: #f5f8fb;
    --chatbot-success: #20a464;
    --chatbot-danger: #b42318;

    --chatbot-radius: 22px;
    --chatbot-shadow:
        0 24px 60px rgba(15, 23, 42, 0.22),
        0 8px 24px rgba(15, 23, 42, 0.12);

    position: fixed;
    right: calc(var(--rail-width) + 24px);
    bottom: 24px;
    z-index: 9999;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--chatbot-text);
}


/*
|--------------------------------------------------------------------------
| BOTÓN FLOTANTE
|--------------------------------------------------------------------------
*/

.central-chatbot__launcher {
    position: relative;

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

    min-height: 58px;
    padding: 0 20px;

    border: 0;
    border-radius: 999px;

    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            var(--chatbot-primary),
            var(--chatbot-primary-dark)
        );

    box-shadow:
        0 14px 34px rgba(18, 59, 102, 0.3);

    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.central-chatbot__launcher:hover {
    transform: translateY(-2px);

    box-shadow:
        0 18px 42px rgba(18, 59, 102, 0.38);
}

.central-chatbot__launcher:active {
    transform: translateY(0);
}

.central-chatbot__launcher:focus-visible {
    outline: 3px solid rgba(213, 166, 47, 0.48);
    outline-offset: 4px;
}

.central-chatbot__launcher-icon {
    display: grid;
    place-items: center;

    width: 34px;
    height: 34px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.15);

    font-size: 1.15rem;
}

.central-chatbot__launcher-text {
    white-space: nowrap;
}

.central-chatbot__launcher-status {
    position: absolute;
    top: 3px;
    right: 4px;

    width: 12px;
    height: 12px;

    border: 2px solid #ffffff;
    border-radius: 50%;

    background: var(--chatbot-success);

    box-shadow:
        0 0 0 4px rgba(32, 164, 100, 0.16);
}

.central-chatbot__launcher.is-open {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(0.94);
}


/*
|--------------------------------------------------------------------------
| PANEL PRINCIPAL
|--------------------------------------------------------------------------
*/

.central-chatbot__panel {
    position: absolute;
    right: 0;
    bottom: 0;

    display: grid;
    grid-template-rows:
        auto
        minmax(180px, 1fr)
        auto
        auto
        auto
        auto;

    width: min(390px, calc(100vw - 32px));
    height: min(690px, calc(100vh - 48px));

    overflow: hidden;

    border: 1px solid rgba(18, 59, 102, 0.12);
    border-radius: var(--chatbot-radius);

    background: var(--chatbot-bg);

    box-shadow: var(--chatbot-shadow);

    opacity: 0;
    visibility: hidden;

    transform:
        translateY(24px)
        scale(0.96);

    transform-origin: bottom right;

    transition:
        opacity 0.24s ease,
        transform 0.24s ease,
        visibility 0.24s ease;
}

.central-chatbot__panel.is-open {
    opacity: 1;
    visibility: visible;

    transform:
        translateY(0)
        scale(1);
}


/*
|--------------------------------------------------------------------------
| ENCABEZADO
|--------------------------------------------------------------------------
*/

.central-chatbot__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 17px 18px;

    color: #ffffff;

    background:
        radial-gradient(
            circle at top right,
            rgba(213, 166, 47, 0.25),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            var(--chatbot-primary),
            var(--chatbot-primary-dark)
        );
}

.central-chatbot__identity {
    display: flex;
    align-items: center;
    gap: 12px;

    min-width: 0;
}

.central-chatbot__avatar {
    display: grid;
    place-items: center;

    flex: 0 0 auto;

    width: 44px;
    height: 44px;

    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.14);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18);

    font-size: 1.3rem;
}

.central-chatbot__identity h2 {
    margin: 0;

    color: #ffffff;

    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
}

.central-chatbot__identity p {
    display: flex;
    align-items: center;
    gap: 6px;

    margin: 4px 0 0;

    color: rgba(255, 255, 255, 0.82);

    font-size: 0.78rem;
    line-height: 1.2;
}

.central-chatbot__online {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #68d391;

    box-shadow:
        0 0 0 4px rgba(104, 211, 145, 0.15);
}

.central-chatbot__close {
    display: grid;
    place-items: center;

    flex: 0 0 auto;

    width: 38px;
    height: 38px;

    padding: 0;

    border: 0;
    border-radius: 12px;

    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);

    font: inherit;
    font-size: 1.65rem;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.central-chatbot__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(4deg);
}

.central-chatbot__close:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.35);
    outline-offset: 2px;
}


/*
|--------------------------------------------------------------------------
| CONTENEDOR DE MENSAJES
|--------------------------------------------------------------------------
*/

.central-chatbot__messages {
    overflow-y: auto;
    overscroll-behavior: contain;

    padding: 18px 15px 14px;

    background:
        radial-gradient(
            circle at top left,
            rgba(18, 59, 102, 0.035),
            transparent 30%
        ),
        linear-gradient(
            180deg,
            #f8fafc 0%,
            #ffffff 42%
        );

    scrollbar-width: thin;
    scrollbar-color:
        rgba(18, 59, 102, 0.24)
        transparent;
}

.central-chatbot__messages::-webkit-scrollbar {
    width: 7px;
}

.central-chatbot__messages::-webkit-scrollbar-track {
    background: transparent;
}

.central-chatbot__messages::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(18, 59, 102, 0.22);
}

.central-chatbot__message-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;

    width: 100%;
    margin-bottom: 14px;

    animation:
        centralChatbotMessageIn
        0.22s ease both;
}

.central-chatbot__message-row--bot {
    justify-content: flex-start;
}

.central-chatbot__message-row--user {
    justify-content: flex-end;
}

@keyframes centralChatbotMessageIn {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.central-chatbot__message-avatar {
    display: grid;
    place-items: center;

    flex: 0 0 auto;

    width: 30px;
    height: 30px;

    border: 1px solid rgba(18, 59, 102, 0.12);
    border-radius: 10px;

    background: #ffffff;

    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.08);

    font-size: 0.9rem;
}


/*
|--------------------------------------------------------------------------
| BURBUJAS
|--------------------------------------------------------------------------
*/

.central-chatbot__message {
    position: relative;

    max-width: 82%;
    padding: 11px 12px 8px;

    border-radius: 17px;

    font-size: 0.9rem;
    line-height: 1.5;

    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.central-chatbot__message--bot {
    border: 1px solid var(--chatbot-border);
    border-bottom-left-radius: 5px;

    background: #ffffff;

    box-shadow:
        0 5px 18px rgba(15, 23, 42, 0.065);
}

.central-chatbot__message--user {
    border-bottom-right-radius: 5px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            var(--chatbot-primary),
            #17588f
        );

    box-shadow:
        0 6px 18px rgba(18, 59, 102, 0.2);
}

.central-chatbot__message-title {
    display: block;

    margin-bottom: 5px;

    color: var(--chatbot-primary);

    font-size: 0.85rem;
    font-weight: 800;
}

.central-chatbot__message--user
.central-chatbot__message-title {
    color: #ffffff;
}

.central-chatbot__message-text {
    white-space: normal;
}

.central-chatbot__message-time {
    display: block;

    margin-top: 7px;

    color: var(--chatbot-text-soft);

    font-size: 0.66rem;
    line-height: 1;
    text-align: right;
}

.central-chatbot__message--user
.central-chatbot__message-time {
    color: rgba(255, 255, 255, 0.72);
}


/*
|--------------------------------------------------------------------------
| MENSAJE DEL SISTEMA
|--------------------------------------------------------------------------
*/

.central-chatbot__system-message {
    margin: 10px auto 14px;
    padding: 8px 11px;

    max-width: 90%;

    border: 1px solid rgba(180, 35, 24, 0.14);
    border-radius: 12px;

    color: var(--chatbot-danger);
    background: rgba(180, 35, 24, 0.055);

    font-size: 0.78rem;
    line-height: 1.4;
    text-align: center;
}


/*
|--------------------------------------------------------------------------
| MULTIMEDIA
|--------------------------------------------------------------------------
*/

.central-chatbot__media-list {
    display: grid;
    gap: 9px;

    margin-top: 10px;
}

.central-chatbot__media {
    margin: 0;
    overflow: hidden;

    border: 1px solid var(--chatbot-border);
    border-radius: 13px;

    background: var(--chatbot-bg-soft);
}

.central-chatbot__media img {
    display: block;

    width: 100%;
    max-height: 245px;

    object-fit: cover;

    cursor: zoom-in;
}

.central-chatbot__media video,
.central-chatbot__media audio {
    display: block;

    width: 100%;
}

.central-chatbot__media figcaption,
.central-chatbot__media-title {
    display: block;

    padding: 8px 10px;

    color: var(--chatbot-text-soft);

    font-size: 0.75rem;
    line-height: 1.35;
}

.central-chatbot__document-link {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 10px 11px;

    border: 1px solid var(--chatbot-border);
    border-radius: 12px;

    color: var(--chatbot-primary);
    background: var(--chatbot-primary-soft);

    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.central-chatbot__document-link:hover {
    background: #dceaf7;
    transform: translateY(-1px);
}


/*
|--------------------------------------------------------------------------
| ACCIONES DE RESPUESTA
|--------------------------------------------------------------------------
*/

.central-chatbot__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    margin-top: 11px;
}

.central-chatbot__action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 36px;
    padding: 7px 10px;

    border: 1px solid rgba(18, 59, 102, 0.16);
    border-radius: 10px;

    color: var(--chatbot-primary);
    background: var(--chatbot-primary-soft);

    font: inherit;
    font-size: 0.75rem;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;

    cursor: pointer;

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.central-chatbot__action-button:hover {
    transform: translateY(-1px);

    border-color: rgba(18, 59, 102, 0.25);

    background: #dceaf7;
}

.central-chatbot__action-button:focus-visible {
    outline: 3px solid rgba(18, 59, 102, 0.18);
    outline-offset: 2px;
}

.central-chatbot__action-icon {
    font-size: 0.9rem;
}


/*
|--------------------------------------------------------------------------
| NAVEGACIÓN ATRÁS / INICIO
|--------------------------------------------------------------------------
*/

.central-chatbot__navigation {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 8px 13px;

    border-top: 1px solid var(--chatbot-border);
    border-bottom: 1px solid var(--chatbot-border);

    background: #ffffff;
}

.central-chatbot__navigation[hidden] {
    display: none;
}

.central-chatbot__nav-button {
    min-height: 32px;
    padding: 6px 10px;

    border: 1px solid var(--chatbot-border);
    border-radius: 9px;

    color: var(--chatbot-primary);
    background: #ffffff;

    font: inherit;
    font-size: 0.74rem;
    font-weight: 750;

    cursor: pointer;

    transition:
        background 0.18s ease,
        border-color 0.18s ease;
}

.central-chatbot__nav-button:hover {
    border-color: rgba(18, 59, 102, 0.25);
    background: var(--chatbot-primary-soft);
}

.central-chatbot__nav-button:disabled {
    opacity: 0.5;
    cursor: wait;
}


/*
|--------------------------------------------------------------------------
| OPCIONES DEL ÁRBOL
|--------------------------------------------------------------------------
*/

.central-chatbot__options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;

    max-height: 205px;
    overflow-y: auto;

    padding: 10px 13px;

    background: var(--chatbot-bg-soft);

    scrollbar-width: thin;
    scrollbar-color:
        rgba(18, 59, 102, 0.2)
        transparent;
}

.central-chatbot__options:empty {
    display: none;
}

.central-chatbot__option-button {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: 9px;

    width: 100%;
    min-height: 43px;
    padding: 8px 10px;

    border: 1px solid var(--chatbot-border);
    border-radius: 12px;

    color: var(--chatbot-text);
    background: #ffffff;

    font: inherit;
    text-align: left;

    cursor: pointer;

    box-shadow:
        0 3px 10px rgba(15, 23, 42, 0.035);

    transition:
        transform 0.17s ease,
        border-color 0.17s ease,
        box-shadow 0.17s ease,
        background 0.17s ease;
}

.central-chatbot__option-button:hover {
    transform: translateY(-1px);

    border-color: rgba(18, 59, 102, 0.24);

    background: #fbfdff;

    box-shadow:
        0 7px 18px rgba(15, 23, 42, 0.07);
}

.central-chatbot__option-button:focus-visible {
    outline: 3px solid rgba(18, 59, 102, 0.15);
    outline-offset: 2px;
}

.central-chatbot__option-button:disabled {
    opacity: 0.56;
    cursor: wait;
    transform: none;
}

.central-chatbot__option-icon {
    display: grid;
    place-items: center;

    width: 30px;
    height: 30px;

    border-radius: 9px;

    background: var(--chatbot-primary-soft);

    font-size: 0.95rem;
}

.central-chatbot__option-title {
    min-width: 0;

    font-size: 0.79rem;
    font-weight: 750;
    line-height: 1.25;
}

.central-chatbot__option-arrow {
    color: var(--chatbot-primary);

    font-size: 1.05rem;
    font-weight: 800;
}


/*
|--------------------------------------------------------------------------
| FORMULARIO
|--------------------------------------------------------------------------
*/

.central-chatbot__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: end;
    gap: 8px;

    padding: 11px 13px;

    border-top: 1px solid var(--chatbot-border);

    background: #ffffff;
}

.central-chatbot__form textarea {
    width: 100%;
    min-height: 42px;
    max-height: 110px;
    padding: 10px 12px;

    resize: none;
    overflow-y: auto;

    border: 1px solid var(--chatbot-border);
    border-radius: 13px;

    color: var(--chatbot-text);
    background: #ffffff;

    font: inherit;
    font-size: 0.84rem;
    line-height: 1.4;

    box-shadow:
        inset 0 1px 2px rgba(15, 23, 42, 0.025);

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.central-chatbot__form textarea::placeholder {
    color: #96a1af;
}

.central-chatbot__form textarea:focus {
    outline: none;

    border-color: rgba(18, 59, 102, 0.55);

    box-shadow:
        0 0 0 4px rgba(18, 59, 102, 0.09);
}

.central-chatbot__form textarea:disabled {
    background: #f2f5f8;
    cursor: wait;
}

.central-chatbot__form button[type="submit"] {
    display: grid;
    place-items: center;

    width: 42px;
    height: 42px;
    padding: 0;

    border: 0;
    border-radius: 13px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            var(--chatbot-primary),
            var(--chatbot-primary-dark)
        );

    font: inherit;
    font-size: 1rem;

    cursor: pointer;

    box-shadow:
        0 7px 18px rgba(18, 59, 102, 0.22);

    transition:
        transform 0.18s ease,
        opacity 0.18s ease,
        box-shadow 0.18s ease;
}

.central-chatbot__form button[type="submit"]:hover {
    transform: translateY(-1px);

    box-shadow:
        0 10px 22px rgba(18, 59, 102, 0.28);
}

.central-chatbot__form button[type="submit"]:focus-visible {
    outline: 3px solid rgba(18, 59, 102, 0.2);
    outline-offset: 2px;
}

.central-chatbot__form button[type="submit"]:disabled {
    opacity: 0.52;
    cursor: wait;
    transform: none;
}


/*
|--------------------------------------------------------------------------
| PIE
|--------------------------------------------------------------------------
*/

.central-chatbot__footer {
    padding: 8px 13px 10px;

    color: var(--chatbot-text-soft);
    background: #ffffff;

    font-size: 0.65rem;
    line-height: 1.3;
    text-align: center;
}


/*
|--------------------------------------------------------------------------
| INDICADOR ESCRIBIENDO
|--------------------------------------------------------------------------
*/

.central-chatbot__typing {
    display: flex;
    align-items: center;
    gap: 5px;

    min-width: 54px;
    min-height: 35px;
}

.central-chatbot__typing span {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: rgba(18, 59, 102, 0.48);

    animation:
        centralChatbotTyping
        1.1s infinite ease-in-out;
}

.central-chatbot__typing span:nth-child(2) {
    animation-delay: 0.14s;
}

.central-chatbot__typing span:nth-child(3) {
    animation-delay: 0.28s;
}

@keyframes centralChatbotTyping {
    0%,
    60%,
    100% {
        opacity: 0.35;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-4px);
    }
}


/*
|--------------------------------------------------------------------------
| CARGANDO
|--------------------------------------------------------------------------
*/

.central-chatbot.is-loading
.central-chatbot__launcher {
    cursor: wait;
}


/*
|--------------------------------------------------------------------------
| PREVISUALIZACIÓN DE IMAGEN
|--------------------------------------------------------------------------
*/

.central-chatbot__image-preview {
    position: fixed;
    inset: 0;
    z-index: 10050;

    display: grid;
    place-items: center;

    padding: 24px;

    background: rgba(4, 12, 24, 0.88);
    backdrop-filter: blur(8px);

    animation:
        centralChatbotPreviewIn
        0.18s ease both;
}

@keyframes centralChatbotPreviewIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.central-chatbot__image-preview img {
    display: block;

    max-width: min(100%, 1100px);
    max-height: calc(100vh - 70px);

    border-radius: 14px;

    object-fit: contain;

    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.45);
}

.central-chatbot__image-preview-close {
    position: fixed;
    top: 18px;
    right: 18px;

    display: grid;
    place-items: center;

    width: 44px;
    height: 44px;

    padding: 0;

    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;

    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);

    font: inherit;
    font-size: 1.8rem;
    font-weight: 300;

    cursor: pointer;

    backdrop-filter: blur(8px);
}

.central-chatbot__image-preview-close:hover {
    background: rgba(255, 255, 255, 0.2);
}


/*
|--------------------------------------------------------------------------
| ACCESIBILIDAD
|--------------------------------------------------------------------------
*/

.central-chatbot__sr-only {
    position: absolute;

    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;

    overflow: hidden;
    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}


/*
|--------------------------------------------------------------------------
| TABLET
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {
    .central-chatbot {
        right: 16px;
        bottom: 16px;
    }

    .central-chatbot__panel {
        width: min(390px, calc(100vw - 24px));
        height: min(680px, calc(100vh - 30px));
    }

    .central-chatbot__launcher {
        min-height: 54px;
        padding: 0 16px;
    }

    .central-chatbot__launcher-icon {
        width: 31px;
        height: 31px;
    }
}


/*
|--------------------------------------------------------------------------
| MÓVIL
|--------------------------------------------------------------------------
*/

@media (max-width: 520px) {
    .central-chatbot {
        right: 0;
        bottom: 0;
        left: 0;

        width: 100%;
        pointer-events: none;
    }

    .central-chatbot__launcher {
        position: fixed;
        right: 14px;
        bottom: 14px;

        min-width: 56px;
        width: 56px;
        height: 56px;
        min-height: 56px;

        padding: 0;

        border-radius: 50%;

        pointer-events: auto;
    }

    .central-chatbot__panel {
        position: fixed;

        right: 12px;
        bottom: 12px;
        left: 12px;
        top: auto;

        width: auto;
        height: min(78dvh, 680px);
        max-height: calc(100dvh - 24px);

        border: 1px solid rgba(18, 59, 102, 0.14);
        border-radius: 22px;

        box-shadow:
            0 24px 70px rgba(4, 12, 24, 0.34);

        transform:
            translateY(36px)
            scale(0.97);

        transform-origin: center bottom;

        pointer-events: auto;
    }

    .central-chatbot__panel.is-open {
        transform:
            translateY(0)
            scale(1);
    }

    .central-chatbot__header {
        padding:
            14px
            15px;
    }

    .central-chatbot__messages {
        padding: 15px 12px 12px;
    }

    .central-chatbot__message {
        max-width: 87%;
    }

    .central-chatbot__options {
        max-height: 180px;
        padding: 9px 11px;
    }

    .central-chatbot__navigation {
        padding: 8px 11px;
    }

    .central-chatbot__form {
        padding:
            10px
            11px
            calc(10px + env(safe-area-inset-bottom));
    }

    .central-chatbot__footer {
        display: none;
    }
}


/*
|--------------------------------------------------------------------------
| PANTALLAS PEQUEÑAS EN ALTURA
|--------------------------------------------------------------------------
*/

@media (max-height: 620px) and (min-width: 521px) {
    .central-chatbot__panel {
        height: calc(100vh - 24px);
    }

    .central-chatbot__options {
        max-height: 150px;
    }

    .central-chatbot__messages {
        padding-top: 13px;
    }
}


/*
|--------------------------------------------------------------------------
| MOVIMIENTO REDUCIDO
|--------------------------------------------------------------------------
*/

@media (prefers-reduced-motion: reduce) {
    .central-chatbot *,
    .central-chatbot *::before,
    .central-chatbot *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================================
   CORRECCIÓN DEL BOTÓN FLOTANTE EN MÓVIL
   ========================================================= */

@media (max-width: 520px) {
    .central-chatbot {
        position: fixed;
        right: 0;
        bottom: 0;
        left: auto;

        width: auto;
        height: auto;

        pointer-events: none;
    }

    .central-chatbot__launcher {
        position: fixed;
        right: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom));

        display: grid;
        place-items: center;

        width: 58px;
        min-width: 58px;
        max-width: 58px;

        height: 58px;
        min-height: 58px;

        padding: 0;
        margin: 0;

        overflow: visible;

        border-radius: 50%;

        pointer-events: auto;
    }

    .central-chatbot__launcher-text {
        display: none !important;
    }

    .central-chatbot__launcher-icon {
        display: grid;
        place-items: center;

        width: 100%;
        height: 100%;

        padding: 0;
        margin: 0;

        border-radius: 50%;

        background: transparent;

        font-size: 1.45rem;
        line-height: 1;
    }

    .central-chatbot__launcher-status {
        top: 1px;
        right: 0;

        width: 13px;
        height: 13px;
    }

    .central-chatbot__launcher.is-open {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .central-chatbot__panel {
        pointer-events: auto;
    }
}

@media (max-width: 768px) {
    .central-chatbot {
        right: 0;
    }

    .central-chatbot__launcher {
        right: 14px;
    }

    .central-chatbot__panel {
        right: 12px;
        left: 12px;
    }
}

/*
|--------------------------------------------------------------------------
| BOTONES DE ACCIÓN POR MARCA
|--------------------------------------------------------------------------
*/

.central-chatbot__action-button {
    position: relative;
    overflow: hidden;

    min-height: 38px;
    padding: 8px 12px;

    border-width: 1px;
    border-style: solid;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}

.central-chatbot__action-button:hover {
    transform: translateY(-2px);
}

.central-chatbot__action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 18px;
    min-width: 18px;

    font-size: 1rem;
    line-height: 1;
}

.central-chatbot__action-label {
    line-height: 1.2;
}


/* WhatsApp */

.central-chatbot__action-button--whatsapp {
    border-color: #1fa855;
    color: #ffffff;
    background: #25d366;

    box-shadow:
        0 5px 14px rgba(37, 211, 102, 0.22);
}

.central-chatbot__action-button--whatsapp:hover {
    border-color: #168f46;
    color: #ffffff;
    background: #1fb858;

    box-shadow:
        0 8px 18px rgba(37, 211, 102, 0.3);
}


/* YouTube */

.central-chatbot__action-button--youtube {
    border-color: #d90000;
    color: #ffffff;
    background: #ff0000;

    box-shadow:
        0 5px 14px rgba(255, 0, 0, 0.18);
}

.central-chatbot__action-button--youtube:hover {
    border-color: #b90000;
    color: #ffffff;
    background: #d90000;
}


/* Facebook */

.central-chatbot__action-button--facebook {
    border-color: #0866c6;
    color: #ffffff;
    background: #1877f2;

    box-shadow:
        0 5px 14px rgba(24, 119, 242, 0.2);
}

.central-chatbot__action-button--facebook:hover {
    border-color: #0757a8;
    color: #ffffff;
    background: #0f68d5;
}


/* Instagram */

.central-chatbot__action-button--instagram {
    border-color: transparent;
    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #833ab4 0%,
            #c13584 42%,
            #e1306c 67%,
            #f77737 100%
        );

    box-shadow:
        0 5px 14px rgba(193, 53, 132, 0.22);
}

.central-chatbot__action-button--instagram:hover {
    border-color: transparent;
    color: #ffffff;

    box-shadow:
        0 8px 18px rgba(193, 53, 132, 0.3);
}


/* TikTok */

.central-chatbot__action-button--tiktok {
    border-color: #111111;
    color: #ffffff;
    background: #111111;
}

.central-chatbot__action-button--tiktok:hover {
    color: #ffffff;
    background: #000000;
}


/* Google Maps */

.central-chatbot__action-button--maps {
    border-color: #2f76dc;
    color: #ffffff;
    background: #4285f4;

    box-shadow:
        0 5px 14px rgba(66, 133, 244, 0.2);
}

.central-chatbot__action-button--maps:hover {
    border-color: #2766c1;
    color: #ffffff;
    background: #3475dc;
}


/* Waze */

.central-chatbot__action-button--waze {
    border-color: #58b9d6;
    color: #173b4c;
    background: #86e3f2;

    box-shadow:
        0 5px 14px rgba(134, 227, 242, 0.22);
}

.central-chatbot__action-button--waze:hover {
    border-color: #46a9c7;
    color: #173b4c;
    background: #70d5e6;
}


/* Teléfono */

.central-chatbot__action-button--phone {
    border-color: #1261a8;
    color: #ffffff;
    background: #1874c8;

    box-shadow:
        0 5px 14px rgba(24, 116, 200, 0.2);
}

.central-chatbot__action-button--phone:hover {
    border-color: #0d518f;
    color: #ffffff;
    background: #1261a8;
}


/* Correo */

.central-chatbot__action-button--email {
    border-color: #52606f;
    color: #ffffff;
    background: #64748b;
}

.central-chatbot__action-button--email:hover {
    border-color: #3f4b59;
    color: #ffffff;
    background: #52606f;
}


/* Formulario */

.central-chatbot__action-button--form {
    border-color: var(--chatbot-primary);
    color: #ffffff;
    background: var(--chatbot-primary);
}

.central-chatbot__action-button--form:hover {
    color: #ffffff;
    background: var(--chatbot-primary-dark);
}


/* Sección interna */

.central-chatbot__action-button--section {
    border-color: var(--chatbot-accent-dark);
    color: var(--chatbot-primary-dark);
    background: var(--chatbot-accent);
}

.central-chatbot__action-button--section:hover {
    color: var(--chatbot-primary-dark);
    background: #e0b63f;
}


/* Descargar */

.central-chatbot__action-button--download {
    border-color: #6d4bc3;
    color: #ffffff;
    background: #7952cc;
}

.central-chatbot__action-button--download:hover {
    color: #ffffff;
    background: #6944b8;
}


/* Enlace general */

.central-chatbot__action-button--url {
    border-color: rgba(18, 59, 102, 0.18);
    color: var(--chatbot-primary);
    background: var(--chatbot-primary-soft);
}

.central-chatbot__action-button--url:hover {
    border-color: rgba(18, 59, 102, 0.3);
    color: var(--chatbot-primary-dark);
    background: #dceaf7;
}

@media (max-width: 520px) {
    .central-chatbot__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .central-chatbot__action-button {
        width: 100%;
        min-height: 42px;

        justify-content: flex-start;

        padding: 9px 12px;

        font-size: 0.8rem;
    }
}

