body {
    background: #e9ddcf;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* LOGO SUPERIOR */
.logo-container {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
}
.logo-container img {
    height: 80px;
}

/* FORMULARIO */
.form-box {
    max-width: 420px;
    margin: 10px auto 30px auto;
    background: #fff7ef;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 15px rgba(0,0,0,0.15);
}
.form-box h3 {
    margin-top: 0;
    color: #4b2a16;
}
.form-box p {
    margin-bottom: 15px;
    color: #333;
}
.form-box input {
    width: 95%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid #c7b299;
}
.form-box button {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: none;
    background: #4b2a16;
    color: white;
    font-weight: bold;
    cursor: pointer;
}
.form-box button:hover {
    opacity: 0.9;
}

/* CHAT */
.chat-container {
    max-width: 900px;
    margin: 0 auto 30px auto;
    background: #fff7ef;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.15);
    overflow: hidden;
}

.chat-header {
    background: #4b2a16;
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-header span {
    font-size: 1.1rem;
    font-weight: bold;
}
.close-btn {
    background: #fff;
    color: #4b2a16;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
}
.close-btn:hover {
    opacity: 0.9;
}

.chat-box {
    height: 380px;
    overflow-y: auto;
    padding: 15px;
    background: #fff;
}

/* Mensajes */
.msg-user,
.msg-bot {
    margin-bottom: 12px;
}

.msg-name {
    font-size: 0.75rem;
    margin-bottom: 2px;
    opacity: 0.7;
}

.bubble-user,
.bubble-bot {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 70%;
    font-size: 0.9rem;
}

.msg-user {
    text-align: right;
}
.msg-user .bubble-user {
    background: #d6c1aa;
    color: #000;
    margin-left: auto;
}

.msg-bot {
    text-align: left;
}
.msg-bot .bubble-bot {
    background: #4b2a16;
    color: #fff;
}

/* Typing indicator */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 0 15px 8px 15px;
    font-size: 0.85rem;
    color: #4b2a16;
}
.typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4b2a16;
    animation: blink 1.4s infinite both;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }

.typing-text {
    margin-left: 6px;
}

@keyframes blink {
    0% { opacity: .2; }
    20% { opacity: 1; }
    100% { opacity: .2; }
}

/* Input área */
.input-area {
    display: flex;
    padding: 10px 15px 15px 15px;
    gap: 8px;
    background: #fff7ef;
}
#mensaje {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #c7b299;
}
#btnEnviar {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    background: #4b2a16;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}
#btnEnviar:hover {
    opacity: 0.9;
}

/* Footer legal */
.footer-legal {
    text-align: center;
    font-size: 0.8rem;
    padding: 8px 0 12px 0;
}
.footer-legal a {
    color: #4b2a16;
    text-decoration: none;
    font-weight: bold;
}
.footer-legal a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .chat-container {
        margin: 0 10px 20px 10px;
    }
    .form-box {
        margin: 10px 10px 30px 10px;
    }
}
