/* static/css/chat.css */
.kraken-chat-circle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #00000098;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 1001;
}

/* Efecto de zoom en el logo sobre el menu superior */
.kraken-chat-circle {
    padding: 10px 20px;                     /* Espaciado interno */
    transition: transform 0.3s ease;        /* Transición suave para el hover */
}

.kraken-chat-circle:hover {
    transform: scale(1.15);                /* Efecto de agrandar en hover */
    box-shadow: 0 0 12px rgba(232, 236, 17, 0.808);
}

/* ===================================== */

.kraken-chat-box {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 450px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: none;
    flex-direction: column;
    z-index: 1000;
}

/* Cinta Superior del contenedor del Chat */
.kraken-chat-header {
    background-color: #1c2125;
    color: white;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

/* Botones en línea */
.kraken-chat-header > div {
    display: flex;
    gap: 8px; /* Espacio entre botones */
}
/* Botones de Cerrar y Minimizar */
.kraken-chat-header button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

/* Circulos de los Botones Cerrar y Minimizar */
.kraken-chat-header button:hover {
    background-color: rgba(253, 0, 0, 0.404);
    
}

/* Fondo del chat */
.kraken-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #0e141b;
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Animación suave al escribir */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* FONDO DETRAS DEL TEXBOX */
.kraken-chat-input {
    display: flex;
    border-top: 1px solid #979797;
    padding: 10px;
    background-color: #1c2125;
}
/* CAJA DE TEXTO PARA USUARIO */
.kraken-chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    margin-right: 10px;
}
/* lineas de contorno del texbox */
.kraken-chat-input input:focus {
    border-color: #0044ff;
    box-shadow: 0 0 0 2px rgba(0, 60, 255, 0.37);
}

/* BOTON DE ENVIO EN EL CHAT */
.kraken-chat-input button {
    padding: 10px 20px;
    background: linear-gradient(45deg, #007bff, #00bfff, #007bff);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.5s;
}
/* ANIMACION INVERSA DEL BOTO ENVIAR */
.kraken-chat-input button:hover {
    background: linear-gradient(45deg, #00bfff, #007bff, #00bfff);
    /* transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); */
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(17, 68, 236, 0.808);

    
}

/* --- MENSAJES MEJORADOS CON AVATAR Y ANIMACIONES --- */
.kraken-message {
    max-width: 90%;
    animation: fadeIn 0.3s ease-out;
    padding: 12px 16px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
    display: block;
    color: #ffffff;
    border-radius: 18px;
    margin-bottom: 10px;
}

.kraken-chat-circle[data-tooltip] {
    position: fixed; /* Asegurar posición en todos los estados */
    right: 20px;
    bottom: 20px;
}
/* MENSAJE FINAL DE CIERRE "ESTOY AQUI" */
.kraken-chat-circle[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    padding: 6px 12px;
    background: #eeff00; /* Color del tooltip */
    color: #16191b; /* Color del texto del tooltip */
    box-shadow: 0 0 20px rgba(232, 236, 17, 0.808);
    border-radius: 4px; 
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.kraken-chat-circle:hover[data-tooltip]::after {
    opacity: 1;
}

/* Animación para el tooltip */
@keyframes tooltip-fade {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    30% { opacity: 1; transform: translateX(-50%) translateY(0); }
    70% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-5px); }
}

.kraken-chat-circle[data-tooltip]::after {
    animation: tooltip-fade 3s forwards;
}
/* CONTENEDOR PARA MENSAJE DE BOT */
.kraken-bot-message {
    background: #283528;
    border-left: 4px solid #18ce00;
    border-radius: 18px 18px 18px 4px;
    animation: pop-in 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    align-self: flex-start;
}
/* CONTENEDOR PARA MENSAJES DE USUARIO */
.kraken-user-message {
    background: #332727;
    border-left: 4px solid #ce0000;
    border-radius: 18px 18px 4px 18px;
    animation: pop-in 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    align-self: flex-end;
}

/* AVATAR PARA IMAGEN */
.kraken-avatar {
    display: none !important;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

@keyframes pop-in {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- ANIMACIÓN DE ESCRIBIENDO (°°°) --- */
.kraken-typing-indicator {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background: #283528;
    border-radius: 18px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: typing-dot 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-dot {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

/* Modal de confirmación moderno */
.kraken-confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.kraken-modal-content {
    background: linear-gradient(50deg, #838383, #ffffff, #838383);
    padding: 25px;
    border-radius: 12px;
    width: 320px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.kraken-modal-content p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #333;
}

.kraken-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.kraken-modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}
/* BOTON DE MODAL PARA CONTINUAR */
#krakenModalCancel {
    background: #e0e0e0;
    color: #29af00;
}

#krakenModalCancel:hover {
    background: #2bd600;
    color: white;
}

/* BOTON DE MODAL PARA CERRAR */
#krakenModalConfirm {
    background: #ff0000;
    color: white;
}

#krakenModalConfirm:hover {
    background: #e00000;
    transform: translateY(-2px);
}
