/* ========== ESTILOS CHATBOT ========== */
:root {
    --bot-primary-color: #9D0208; /* Reemplazar por color del bot */
    --bot-dark-color: #5A0105;
}

#chat-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bot-primary-color);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: floatChat 3s ease-in-out infinite;
}

#chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

@keyframes floatChat {
    0% { transform: translateY(0px) scale(1); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
    50% { transform: translateY(-8px) scale(1.05); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
    100% { transform: translateY(0px) scale(1); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
}

#chat-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 340px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9) translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#chat-window.open {
    opacity: 1;
    pointer-events: all;
    transform: scale(1) translateY(0);
}

.chat-header {
    background: linear-gradient(135deg, var(--bot-dark-color), var(--bot-primary-color));
    color: white;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 1.5px solid rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.chat-header-info {
    flex: 1;
}

.chat-header-info strong {
    font-size: 14px;
    font-weight: 600;
    display: block;
}

.chat-header-info span {
    font-size: 11px;
    color: #ffd060;
    margin-top: 1px;
    display: block;
}

.online-dot {
    width: 7px;
    height: 7px;
    background: #5dca75;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}

.lang-toggle {
    display: flex;
    gap: 4px;
    background: rgba(0,0,0,0.25);
    border-radius: 20px;
    padding: 3px;
}

.lang-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.55);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: sans-serif;
    letter-spacing: 0.5px;
}

.lang-btn.active {
    background: #ffd060;
    color: var(--bot-dark-color);
}

.chat-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    margin-left: 4px;
}

.chat-close:hover {
    background: rgba(255,255,255,0.3);
}

#lang-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: #fafaf8;
    flex: 1;
    gap: 1rem;
}

.lang-screen-icon {
    font-size: 40px;
    margin-bottom: .25rem;
}

.lang-screen-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    font-family: sans-serif;
    text-align: center;
}

.lang-choice-btns {
    display: flex;
    gap: 12px;
    margin-top: .5rem;
}

.lang-choice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1.5px solid #e0d5c5;
    border-radius: 14px;
    padding: 14px 20px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: sans-serif;
    min-width: 120px;
}

.lang-choice-btn:hover {
    border-color: var(--bot-primary-color);
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.lang-choice-btn .flag { font-size: 28px; }
.lang-choice-btn .lang-name { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.lang-choice-btn .lang-sub { font-size: 11px; color: #888; }

.quick-suggestions {
    display: flex;
    gap: 6px;
    padding: 10px 12px 4px;
    overflow-x: auto;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    scrollbar-width: none;
}

.quick-suggestions::-webkit-scrollbar { display: none; }

.suggestion-btn {
    white-space: nowrap;
    background: #fff;
    border: 1px solid #e0d5c5;
    color: var(--bot-primary-color);
    font-size: 11.5px;
    padding: 5px 11px;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-family: sans-serif;
}

.suggestion-btn:hover {
    background: #fff8ec;
    border-color: var(--bot-primary-color);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fafaf8;
}

.msg {
    max-width: 85%;
    padding: 10px 13px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.6;
    font-family: sans-serif;
}

.msg.bot {
    background: #fff;
    border: 1px solid #ede8de;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    color: #1a1a1a;
}

.msg.user {
    background: linear-gradient(135deg, var(--bot-primary-color), var(--bot-dark-color));
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.msg.typing {
    color: #aaa;
    font-style: italic;
    background: #fff;
    border: 1px solid #ede8de;
}

.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 11px 12px;
    border-top: 1px solid #eee;
    background: white;
}

.chat-input-area input {
    flex: 1;
    border: 1.5px solid #e0e0e0;
    border-radius: 20px;
    padding: 9px 14px;
    font-size: 13px;
    font-family: sans-serif;
    outline: none;
    transition: border-color 0.15s;
    background: #fafaf8;
}

.chat-input-area input:focus {
    border-color: var(--bot-primary-color);
    background: white;
}

.chat-input-area button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd060, #f0a800);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, box-shadow 0.15s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(240,168,0,0.35);
}

.chat-input-area button:hover { transform: scale(1.06); }
.chat-input-area button:active { transform: scale(0.94); }
.chat-input-area button svg { width: 16px; height: 16px; fill: var(--bot-dark-color); }

@media (max-width: 400px) {
    #chat-window {
        width: calc(100vw - 16px);
        right: 8px;
        bottom: 88px;
    }
}
@media (max-width: 768px) {
    #chat-window {
        width: calc(100vw - 20px);
        height: 400px;
    }
}
/* ========== FIN ESTILOS CHATBOT ========== */
