﻿/* ── Boton flotante ── */
#chat-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #F25201;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

    #chat-toggle:hover {
        background-color: #d94700;
        transform: scale(1.1);
    }

/* ── Caja de chat ── */
#chat-box {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 360px;
    height: 500px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    #chat-box.hidden {
        display: none;
    }

/* ── Header ── */
#chat-header {
    background-color: #2D2666;
    color: white;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 15px;
}

#chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

    #chat-close:hover {
        color: #F25201;
    }

/* ── Area de mensajes ── */
#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f5f5f5;
}

/* ── Burbujas ── */
.bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

    .bubble.user {
        background-color: #2D2666;
        color: white;
        align-self: flex-end;
        border-bottom-right-radius: 4px;
    }

    .bubble.bot {
        background-color: #ffffff;
        color: #333;
        align-self: flex-start;
        border-bottom-left-radius: 4px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }

    .bubble.loading {
        background-color: #ffffff;
        color: #999;
        align-self: flex-start;
        font-style: italic;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }

/* ── Input area ── */
#chat-input-area {
    display: flex;
    padding: 12px;
    border-top: 1px solid #e0e0e0;
    background-color: #ffffff;
    gap: 8px;
}

#chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

    #chat-input:focus {
        border-color: #2D2666;
    }

#chat-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #F25201;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

    #chat-send:hover {
        background-color: #d94700;
    }
