/* CONTENEDOR GENERAL */
#global-chat {
    position: sticky;
    bottom: 24px;
    left: 100%;
    width: 340px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    z-index: 9999;
}
#global-chat {
    cursor: pointer;
}

.chat-body,
.chat-form,
.chat-input,
.chat-messages {
    cursor: default;
}

/* HEADER */
.chat-header {
    background: linear-gradient(135deg, #bd1433, #8f0f27);
    color: #fff;
    padding: 14px 16px;
    font-weight: 600;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

/* BOTÓN */
.chat-toggle {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
}

/* CUERPO (CERRADO POR DEFECTO) */
.chat-body {
    margin-top: 8px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    display: none;
    overflow: hidden;
    animation: chatOpen 0.25s ease-out;
}

/* MENSAJES */
.chat-messages {
    height: 260px;
    padding: 14px;
    overflow-y: auto;
    font-size: 14px;
}

/* MENSAJE NORMAL */
.chat-message {
    max-width: 85%;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f1f1f1;
    color: #333;
    line-height: 1.3;
}

/* SISTEMA */
.chat-message.system {
    background: #ffeaea;
    color: #9b1c1c;
    font-size: 13px;
    border-left: 4px solid #bd1433;
}

/* FORM */
.chat-form {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #eee;
}

/* INPUT */
.chat-form input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 20px;
    border: 1px solid #ddd;
    outline: none;
    font-size: 14px;
}

/* BOTÓN ENVIAR */
.chat-form button {
    background: #bd1433;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

/* ANIMACIÓN */
@keyframes chatOpen {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
/* ===== CHAT RESPONSIVE ===== */
@media (max-width: 600px) {

    #global-chat {
    position: sticky;
    bottom: 24px;
    left: 100%;
    width: 70%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    z-index: 9999;
}

    .chat-header {
    background: linear-gradient(135deg, #bd1433, #8f0f27);
    color: #fff;
    padding: 5% 16px;
    font-weight: 600;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    font-size: 2rem;
}

    .chat-body {
        display: none;
        margin-top: 0;
        border-radius: 0 0 14px 14px;
        height: 70vh; /* 👈 ocupa pantalla */
    }

    .chat-messages {
        height: calc(70vh - 60px);
        font-size: 1rem;
        padding: 16px;
    }

    .chat-message {
        font-size: 1rem;
        line-height: 1.5;
        padding: 12px 14px;
    }

    .chat-message.system {
        font-size: 0.9rem;
    }

    .chat-form {
        padding: 14px;
        gap: 10px;
    }

    .chat-form input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 20px;
    border: 1px solid #ddd;
    outline: none;
    font-size: 2rem;
}

    .chat-form button {
    background: #bd1433;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 2rem;
}
.chat-message.system {
    background: #ffeaea;
    color: #9b1c1c;
    font-size: 2rem;
    border-left: 4px solid #bd1433;
}



}
