/* Estilos de chatbot/webchat.php
   (antes embebidos en <style>; se pasaron a este archivo el 25/09/2026 sin cambiar reglas)
*/
@import url("../base.css");   /* diseño base común (unire3) */


* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    display: flex;
    flex-direction: column;
    height: 100dvh;
}

.chat-header {
    background: linear-gradient(135deg, #1a6bb5, #1557a0);
    color: white;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.chat-header-icon {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chat-header-info h1 {
    font-size: 16px;
    font-weight: 600;
}

.chat-header-info p {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 2px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.msg-bot {
    background: white;
    color: #1a1a1a;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.msg-user {
    background: #1a6bb5;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.msg-typing {
    background: white;
    color: #999;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-style: italic;
    font-size: 13px;
}

.chat-input-area {
    background: white;
    padding: 12px 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    resize: none;
    max-height: 100px;
}

.chat-input:focus { border-color: #1a6bb5; }

.btn-send {
    width: 42px;
    height: 42px;
    background: #1a6bb5;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.btn-send:hover { background: #1557a0; }
.btn-send:disabled { background: #ccc; cursor: default; }

@media (min-width: 640px) {
    body {
        justify-content: center;
        align-items: center;
    }
    .chat-wrapper {
        width: 100%;
        max-width: 480px;
        height: 90dvh;
        display: flex;
        flex-direction: column;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    }
    .chat-header { border-radius: 16px 16px 0 0; }
}
