/* Estilos del Chatbot SIGCAP */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Source Sans Pro', sans-serif;
}

.chatbot-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #698796, #eb1e0f);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.chatbot-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.chatbot-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 500px;
    max-height: calc(100vh - 100px);
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 1px solid #ddd;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-header {
    background: linear-gradient(135deg, #698796, #eb1e0f);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f8f9fa;
    min-height: 0;
    max-height: calc(100% - 120px);
    scroll-behavior: smooth;
}

.chatbot-message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.chatbot-message.user {
    justify-content: flex-end;
}

.chatbot-message.bot {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.message-bubble.user {
    background: #698796;
    color: white;
    border-bottom-right-radius: 4px;
}

.message-bubble.bot {
    background: white;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
    color: #333;
}

.chatbot-input-area {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    background: white;
}

.chatbot-input-group {
    display: flex;
    gap: 10px;
}

.chatbot-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.chatbot-input:focus {
    border-color: #698796;
}

.chatbot-send {
    background: #698796;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.chatbot-send:hover {
    background: #5a747f;
}

.chatbot-send:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.chatbot-suggestions-fixed {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.suggestions-title {
    font-size: 12px;
    font-weight: 600;
    color: #698796;
    margin-bottom: 8px;
    text-align: left;
}

.chatbot-suggestions {
    margin-top: 10px;
}

.suggestion-chip {
    display: inline-block;
    background: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 15px;
    padding: 5px 12px;
    margin: 2px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.suggestion-chip:hover {
    background: #698796;
    color: white;
    border-color: #698796;
}

.typing-indicator {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    max-width: 80%;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.chatbot-intro {
    text-align: center;
    color: #6c757d;
    font-size: 13px;
    padding: 20px;
    line-height: 1.5;
}

.chatbot-intro .fa {
    font-size: 24px;
    color: #698796;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        max-width: 400px;
        height: calc(100vh - 120px);
        max-height: 600px;
        bottom: 70px;
        right: 20px;
    }
    
    .chatbot-container {
        right: 20px;
        bottom: 20px;
    }
    
    .chatbot-messages {
        padding: 15px;
    }
    
    .message-bubble {
        max-width: 85%;
        font-size: 13px;
    }
    
    .suggestions-title {
        font-size: 11px;
    }
    
    .suggestion-chip {
        font-size: 11px;
        padding: 4px 10px;
    }
}

@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 70px;
        right: 10px;
        border-radius: 8px;
    }
    
    .chatbot-container {
        right: 15px;
        bottom: 15px;
    }
    
    .chatbot-trigger {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    .chatbot-messages {
        padding: 10px;
    }
    
    .chatbot-header {
        padding: 12px 15px;
    }
    
    .chatbot-header h4 {
        font-size: 14px;
    }
    
    .message-bubble {
        max-width: 90%;
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .chatbot-input-area {
        padding: 12px;
    }
    
    .chatbot-input {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .chatbot-send {
        width: 35px;
        height: 35px;
    }
    
    .suggestions-title {
        font-size: 10px;
    }
    
    .suggestion-chip {
        font-size: 10px;
        padding: 3px 8px;
        margin: 1px;
    }
}

@media (max-height: 600px) {
    .chatbot-window {
        height: calc(100vh - 80px);
        max-height: 450px;
    }
}

@media (max-height: 400px) {
    .chatbot-window {
        height: calc(100vh - 60px);
        max-height: 300px;
    }
    
    .chatbot-messages {
        padding: 8px;
    }
}

/* Estilos personalizados para la barra de scroll */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Estilos para mejor accesibilidad y UX */
.chatbot-window.chatbot-focused {
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

.chatbot-message {
    animation: fadeInMessage 0.3s ease-in;
}

@keyframes fadeInMessage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}