/* ==========================================================================
   bot/style.css - Chatbot EDD con estilo High-Tech Slate & Cobalt
   ========================================================================== */

/* Contenedor del avatar flotante */
.chatbot-avatar {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 62px;
    height: 62px;
    background: #0d1424;
    border: 2px solid #38bdf8;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4), 0 0 15px rgba(6, 182, 212, 0.3);
    z-index: 10000;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    overflow: hidden;
}

.chatbot-avatar:hover {
    transform: scale(1.08) rotate(4deg);
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.6), 0 0 20px rgba(6, 182, 212, 0.5);
}

.chatbot-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

/* Ventana de Chat */
.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 360px;
    height: 520px;
    max-height: 75vh;
    background-color: #0d1424;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(37, 99, 235, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10001;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', -apple-system, sans-serif;
    backdrop-filter: blur(16px);
}

.chatbot-window.hidden {
    display: none;
    opacity: 0;
    transform: translateY(16px);
}

/* Cabecera del Chat */
.chatbot-header {
    background: linear-gradient(135deg, #121c33 0%, #0d1424 100%);
    color: #f8fafc;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.chatbot-header h3 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbot-header h3::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}

.chatbot-header button {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.chatbot-header button:hover {
    color: #ffffff;
}

/* Área de Mensajes */
.chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #070b14;
}

/* Burbujas de mensaje */
.message {
    padding: 11px 15px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.45;
    max-width: 86%;
    word-wrap: break-word;
}

/* Mensaje del BOT */
.bot-message {
    align-self: flex-start;
    background-color: #121c33;
    border: 1px solid rgba(56, 189, 248, 0.15);
    color: #f1f5f9 !important;
    border-bottom-left-radius: 3px;
    font-family: 'Inter', sans-serif;
}

/* Mensaje del USUARIO */
.user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff !important;
    border-bottom-right-radius: 3px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* Área de Input */
.chatbot-input {
    display: flex;
    padding: 14px 16px;
    background: #0d1424;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    background-color: #070b14;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 8px;
    padding: 10px 14px;
    color: #f8fafc !important;
    font-size: 0.9rem;
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.25s ease;
}

.chatbot-input input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.chatbot-input input::placeholder {
    color: #64748b;
}

.chatbot-input button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-input button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* Scrollbar */
.chatbot-messages::-webkit-scrollbar {
    width: 5px;
}
.chatbot-messages::-webkit-scrollbar-track {
    background: #070b14;
}
.chatbot-messages::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 10px;
}

/* Botón de WhatsApp dentro del chat */
.whatsapp-link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #10b981;
    color: #ffffff !important;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 8px;
    margin-top: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.25s ease;
}

.whatsapp-link-button:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

/* Móvil */
@media (max-width: 480px) {
    .chatbot-window {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        bottom: 0;
        right: 0;
        left: 0 !important;
        top: 0 !important;
        border-radius: 0;
        border: none;
    }
}