/* ================= OVERLAY ================= */
.chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chat-overlay.activo {
    display: block;
    opacity: 1;
}

/* ================= MODAL ================= */
.chat-modal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px; /* ligeramente más amplio */
    max-height: 520px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;

    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.chat-modal.activo {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* ================= HEADER ================= */
.chat-header {
    background: #25D366;
    color: #fff;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 15px;
}

.chat-header button {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.chat-header button:hover {
    opacity: 0.7;
}

/* ================= BODY ================= */
.chat-body {
    padding: 15px;
    overflow-y: auto;
    max-height: 420px;
    background: #fafafa;
}

/* ================= MENSAJES ================= */
.chat-bot {
    background: #f1f1f1;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.4;
    max-width: 85%;
}

.chat-usuario {
    background: #dcf8c6;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-size: 14px;
    text-align: right;
    margin-left: auto;
    max-width: 85%;
}

/* ================= OPCIONES ================= */
.chat-opcion {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    border: 1px solid #dcdcdc; /* más neutro */
    background: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.chat-opcion:hover {
    background: #f0fdf4;
    border-color: #25D366;
}

/* ================= BOTÓN WHATSAPP ================= */
.chat-whatsapp {
    display: block;
    text-align: center;
    background: #25D366;
    color: white;
    padding: 10px;
    border-radius: 8px;
    margin-top: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.chat-whatsapp:hover {
    background: #1ebe5d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37,211,102,0.3);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 480px) {
    .chat-modal {
        width: 95%;
        right: 2.5%;
        bottom: 10px;
        max-height: 85vh;
    }
}