/****** Estilos para la parte de respuestas rápidas *******/
.quick-replies-container {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #f9997b;
    margin-top: 10px;
    overflow-x: auto;
}

.quick-replies-container button {
    background: #FF8811;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: transform 0.2s, background-color 0.2s;
}

.quick-replies-container button:hover {
    transform: translateY(-2px);
    background: #f9997b;
}

/****** Fin de los estilos para la parte de respuestas rápidas *******/

/****** Estilos para la parte de "escribiendo..." *******/
.bot-message .message-content .dot-1,
.bot-message .message-content .dot-2,
.bot-message .message-content .dot-3 {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    margin: 0 2px;
    animation: bounce 1.4s infinite;
    opacity: 0.6;
}

/* Retraso en la animación para cada punto */
.bot-message .message-content .dot-1 {
    animation-delay: 0s;
}

.bot-message .message-content .dot-2 {
    animation-delay: 0.2s;
}

.bot-message .message-content .dot-3 {
    animation-delay: 0.4s;
}

/* Animación de rebote para los puntos */
@keyframes bounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/****** Fin de los estilos para la parte de "escribiendo..." *******/

/* Estilos mejorados para el botón de agregar al carrito */
.button-confirm {
    display: inline-block;
    padding: 5px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    background: linear-gradient(to right, #13c44e, #04a82d);
    color: white;
    border: none;
    transition: background 0.5s ease, transform 0.2s ease-in-out;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
}

/* Efecto hover: cambio de color y ligera elevación */
.button-confirm:hover {
    background: linear-gradient(to right, #ffffff, #ffffff);
    transform: scale(1.05);
    text-decoration: none;
    color: rgb(12, 136, 12);
}

/* Efecto al hacer clic */
.button-confirm:active {
    transform: scale(0.95);
}

/* Estilos de la burbuja de texto */
.speech-bubble {
    position: fixed;
    bottom: 150px;
    /* Ajusta la altura de la nube */
    right: 30px;
    background: white;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: black;
    text-align: center;
    max-width: 200px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    transform: scale(0.8);
}

/* Flecha de la burbuja apuntando al robot */
.speech-bubble::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

/* Mostrar la burbuja */
.speech-bubble.visible {
    opacity: 1;
    transform: scale(1);
}

/* Ocultar la burbuja */
.speech-bubble.hidden {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

#chat-bot {
    width: 380px;
    height: 550px;
    overflow: hidden;
    position: fixed;
    right: 20px;
    bottom: 100px;
    border-radius: 16px;
    transition: all 0.3s ease;
    z-index: 9999;
    display: none;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    background: transparent;
}

#chat-bot.loading {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    background: #fff;
}

.fa-x {
    color: var(--header-text, #ffffff);
    cursor: pointer;
    margin-left: 15px;
    transition: transform 0.5s ease, color 0.5s ease;
}

.fa-x:hover {
    color: #f9997b;
    transform: scale(0.9);
    transition: transform 0.5s ease, color 0.5s ease;
    cursor: pointer;
}

.fa-rotate {
    color: var(--header-text, #ffffff);
    cursor: pointer;
    margin-left: auto;
}

.fa-rotate:hover {
    color: #f9997b;
    transform: scale(0.9);
    transition: transform 0.5s ease, color 0.5s ease;
    cursor: pointer;
}

/* Estilos del chat personalizado */
.card-container {
    background-color: #fff;
    border-radius: 16px;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Avatar en la tarjeta */
.img-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 20px;
    background-image: url("https://novau.io/wp-content/uploads/2025/04/U.png");
}
#chatbot-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
}
/* Estilo del texto del chat */
.text-chat {
    display: flex;
    align-items: center;
    color: black;
    margin: 0;
    font-size: 20px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* Cuerpo de la tarjeta */
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--chat-bg, #ffffff);
    overflow: hidden;
}

/* Contenedor de chat */
#chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scroll-behavior: smooth;
}

/* Estilos para el área de entrada del mensaje */
.message-input {
    display: flex;
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

/* Ajustar el input para que ocupe el espacio disponible */
#message-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
    background-color: #fff;
}

#message-input:focus {
    border-color: var(--button-bg, #ea3103);
}

/* Estilo del botón de enviar */
.message-input .button-send {
    background: var(--button-bg, #ea3103);
    color: var(--button-text, #ffffff);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message-input .button-send:hover {
    transform: scale(1.05);
    background: #f9997b;
}

/* Estilos de los mensajes */
.message-box {
    margin-bottom: 15px;
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message,
.bot-message {
    padding: 8px;
    border-radius: 5px;
}

/* Estilos para el robot */
#robot-icon {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 9998;
    border: 3px solid #fff;
}

#robot-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Efecto adicional para simular el seguimiento con un pseudo-elemento */
#robot-icon:hover::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    top: -10px;
    left: -10px;
}

.card-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--header-bg, #ea3103);
    color: var(--header-text, #ffffff);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    position: relative;
}

.card-header .img-avatar {
    width: auto;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.card-header .img-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.card-header .text-chat {
    display: flex;
    align-items: center;
    color: var(--header-text, #ffffff);
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #4CAF50;
    border-radius: 50%;
    margin-left: 8px;
    position: relative;
}

.status-indicator::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: inherit;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    70% {
        transform: scale(2);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/*RESPONSIVE */
@media (max-width: 768px) {
    #chat-bot {
        width: 100%;
        height: 100%;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }

    #robot-icon {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .card-header {
        border-radius: 0;
    }

    .card-container {
        border-radius: 0;
    }
}

.user-message {
    margin-left: auto;
    background-color: var(--button-bg, #ea3103);
    color: var(--button-text, #ffffff);
    border-radius: 18px 18px 4px 18px;
    padding: 12px 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.bot-message {
    margin-right: auto;
    background-color: #f0f0f0;
    color: var(--chat-text, #000000);
    border-radius: 18px 18px 18px 4px;
    padding: 12px 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.hidden {
    display: none !important;
}

#wifi-loader {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 1000;
}

#wifi-loader svg {
    width: 100px;
    height: 100px;
    position: relative;
}

#wifi-loader svg circle {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke: var(--button-bg, #ea3103);
    transform-origin: center;
}

#wifi-loader svg circle.back {
    stroke: #f0f0f0;
}

#wifi-loader svg circle.front {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: circle-outer135 1.5s ease-in-out infinite;
}

#wifi-loader svg.circle-outer {
    transform: rotate(-90deg);
}

#wifi-loader svg.circle-outer circle {
    stroke-width: 3;
}

#wifi-loader svg.circle-outer circle.back {
    stroke: #f0f0f0;
}

#wifi-loader svg.circle-outer circle.front {
    stroke-dasharray: 150;
    stroke-dashoffset: 150;
    animation: circle-outer135 1.5s ease-in-out infinite;
}

#wifi-loader svg.circle-middle {
    transform: rotate(-90deg) scale(0.7);
}

#wifi-loader svg.circle-middle circle {
    stroke-width: 2.5;
}

#wifi-loader svg.circle-middle circle.back {
    stroke: #f0f0f0;
}

#wifi-loader svg.circle-middle circle.front {
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    animation: circle-middle6123 1.5s ease-in-out infinite;
}

#wifi-loader svg.circle-inner {
    transform: rotate(-90deg) scale(0.4);
}

#wifi-loader svg.circle-inner circle {
    stroke-width: 2;
}

#wifi-loader svg.circle-inner circle.back {
    stroke: #f0f0f0;
}

#wifi-loader svg.circle-inner circle.front {
    stroke-dasharray: 90;
    stroke-dashoffset: 90;
    animation: circle-inner162 1.5s ease-in-out infinite;
}

#wifi-loader .text {
    margin-top: 20px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    position: relative;
    animation: text-animation76 1.5s ease-in-out infinite;
}

#wifi-loader .text::before,
#wifi-loader .text::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
}

#wifi-loader .text::before {
    left: -100%;
}

#wifi-loader .text::after {
    right: -100%;
}

@keyframes circle-outer135 {
    0% {
        stroke-dashoffset: 150;
    }

    50% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: -150;
    }
}

@keyframes circle-middle6123 {
    0% {
        stroke-dashoffset: 120;
    }

    50% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: -120;
    }
}

@keyframes circle-inner162 {
    0% {
        stroke-dashoffset: 90;
    }

    50% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: -90;
    }
}

@keyframes text-animation76 {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* Estilos para el carrito */
#carrito-container {
    padding: 10px 15px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
}

#carrito-container h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--chat-text, #000000);
}

#lista-carrito {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 150px;
    overflow-y: auto;
}

#lista-carrito li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

#lista-carrito li:last-child {
    border-bottom: none;
}

/* Privacy policy styles */
.privacy-policy {
    padding: 8px 20px;
    background-color: #f9f9f9;
    text-align: center;
    font-size: 12px;
    color: #666;
    border-top: 1px solid #eee;
}

.privacy-policy p {
    margin: 0;
}

.privacy-policy a {
    color: var(--button-bg, #ea3103);
    text-decoration: none;
}

.privacy-policy a:hover {
    text-decoration: underline;
}

select.language-selector {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--header-text);
    font-size: 14px;
    margin-left: 15px;
    margin-right: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    height: auto;
}

.language-selector:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.language-selector option {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 8px;
}