@charset "UTF-8";

/* Botón flotante */
.chat-widget-button {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 55px;
    height: 55px;
    background: #1A1A1A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 200;
    border: 2px solid white;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.chat-widget-button:hover { 
    background: #333333;
    transform: scale(1.05);
}
.chat-widget-button i { 
    font-size: 1.3rem; 
    color: white; 
}

/* Notificación */
.chat-notification {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #f56565;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* Panel del chat */
.chat-widget-panel {
    position: fixed;
    bottom: 90px;
    left: 25px;
    width: 380px;
    height: 550px;
    max-height: calc(100vh - 110px);
    background: #FFFFFF;
    z-index: 250;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #EAEAEA;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.chat-widget-panel.open { display: flex; }

/* Header */
.chat-widget-header {
    background: #1A1A1A;
    color: white;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-widget-header h3 { 
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem; 
    font-weight: 500;
    margin: 0; 
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-widget-header h3 i { 
    font-size: 1rem; 
    color: white; 
}
.chat-widget-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}
.chat-widget-close:hover { background: rgba(255, 255, 255, 0.2); }
.chat-widget-close i { font-size: 1rem; color: white; }

/* Mensajes */
.chat-widget-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #F8F8F8;
}
.chat-widget-message {
    display: flex;
    gap: 10px;
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-widget-message.user { 
    align-self: flex-end; 
    flex-direction: row-reverse; 
}
.chat-widget-message.bot { 
    align-self: flex-start; 
}
.chat-widget-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.chat-widget-message.user .chat-widget-avatar { background: #1A1A1A; }
.chat-widget-message.bot .chat-widget-avatar { background: #8A8A8A; }
.chat-widget-avatar i { 
    font-size: 0.9rem; 
    color: white; 
}
.chat-widget-bubble {
    background: white;
    padding: 10px 14px;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #1A1A1A;
    border: 1px solid #EAEAEA;
    border-radius: 18px;
}
.chat-widget-message.user .chat-widget-bubble {
    background: #1A1A1A;
    color: white;
    border: none;
    border-radius: 18px 18px 4px 18px;
}
.chat-widget-message.bot .chat-widget-bubble {
    border-radius: 18px 18px 18px 4px;
}
.chat-widget-time {
    font-size: 0.55rem;
    color: #8A8A8A;
    margin-top: 4px;
    display: block;
}

/* Typing */
.chat-widget-typing {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    background: white;
    border: 1px solid #EAEAEA;
    border-radius: 18px;
}
.chat-widget-typing span {
    width: 6px;
    height: 6px;
    background: #8A8A8A;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}
.chat-widget-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-widget-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Input */
.chat-widget-input-area {
    padding: 12px;
    border-top: 1px solid #EAEAEA;
    display: flex;
    gap: 10px;
    background: white;
}
.chat-widget-input-area input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #E0E0E0;
    border-radius: 30px;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s;
}
.chat-widget-input-area input:focus { 
    outline: none; 
    border-color: #1A1A1A;
}
.chat-widget-input-area button {
    background: #1A1A1A;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.chat-widget-input-area button i { 
    color: white; 
    font-size: 0.9rem; 
}
.chat-widget-input-area button:hover { 
    background: #333333;
    transform: scale(1.02);
}

/* Sugerencias */
.chat-widget-suggestions {
    padding: 10px 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid #EAEAEA;
    background: white;
}
.suggestion-chip {
    background: #F5F5F5;
    padding: 6px 12px;
    font-size: 0.65rem;
    cursor: pointer;
    color: #1A1A1A;
    border: none;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.suggestion-chip i { font-size: 0.65rem; }
.suggestion-chip:hover { 
    background: #1A1A1A; 
    color: white; 
}
.suggestion-chip:hover i { color: white; }

/* Responsive */
@media (max-width: 768px) {
    .chat-widget-button { 
        bottom: 15px; 
        left: 15px; 
        width: 50px; 
        height: 50px; 
    }
    .chat-widget-panel { 
        width: calc(100vw - 30px); 
        left: 15px; 
        bottom: 75px; 
        height: 500px;
        max-height: calc(100vh - 100px);
    }
    .chat-widget-message {
        max-width: 90%;
    }
}