/* Global styles */
* {
    box-sizing: border-box;
    background-color: rgb(244, 244, 244) !important;
}

html {
    background-color: rgb(244, 244, 244) !important;
    margin: 0 !important;
    padding: 0 !important;
}

body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    margin: 0 !important;
    padding: 0 !important;
    background-color: rgb(244, 244, 244) !important;
    color: rgb(0, 0, 0);
    font-weight: 400;
    line-height: 1.4;
    font-size: 16px;
    width: 100vw !important;
    height: 100vh !important;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: rgb(244, 244, 244);
}

/* Chat interface */
.chat-container {
    background-color: rgb(244, 244, 244);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 600px;
    font-family: "Helvetica Neue", Arial, sans-serif;
    max-width: none;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 10px;
    background-color: rgb(244, 244, 244);
}

.message {
    margin-bottom: 15px;
    padding: 12px;
    border: 2px solid rgb(0, 0, 0);
    max-width: 85%;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.4;
    color: rgb(0, 0, 0);
}

.user-message {
    background-color: rgb(220, 220, 220);
    margin-left: auto;
    text-align: right;
}

.assistant-message {
    background-color: #ffffff !important;
    margin-right: auto;
}

.bot-message {
    background-color: #ffffff !important;
    margin-right: auto;
}

.chat-input {
    display: flex;
    align-items: center;
    background-color: rgb(244, 244, 244);
}

.chat-input input {
    flex: 1;
    padding: 12px;
    border: 2px solid rgb(0, 0, 0);
    border-right: none;
    font-size: 16px;
    font-family: "Helvetica Neue", Arial, sans-serif;
    background-color: #ffffff !important;
    color: rgb(0, 0, 0);
    line-height: 1.4;
}

.chat-input button {
    background-color: #ffff0061 !important;
    color: rgb(0, 0, 0) !important;
    border: 2px solid rgb(0, 0, 0);
    padding: 12px 20px;
    cursor: pointer;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    font-size: 16px;
    height: auto;
    box-sizing: border-box;
}

.chat-input button:hover {
    background-color: #ffff0080 !important;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: rgb(0, 0, 0);
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error and warning messages */
.error-message {
    color: rgb(0, 0, 0);
    background-color: rgb(220, 220, 220);
    padding: 12px;
    border: 2px solid rgb(0, 0, 0);
    margin-bottom: 15px;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.4;
}

.warning-message {
    color: rgb(0, 0, 0);
    background-color: rgb(220, 220, 220);
    padding: 12px;
    border: 2px solid rgb(0, 0, 0);
    margin-bottom: 15px;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.4;
}

/* Flag button for reporting incorrect responses */
.flag-button {
    background-color: rgb(220, 220, 220);
    color: rgb(0, 0, 0);
    border: 2px solid rgb(0, 0, 0);
    padding: 8px 12px;
    margin-top: 10px;
    cursor: pointer;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
}

.flag-button:hover {
    background-color: rgb(200, 200, 200);
}

/* Hidden elements */
.hidden {
    display: none;
}

/* Citation styles */
.citation {
    background-color: rgb(220, 220, 220);
    padding: 10px;
    margin-top: 10px;
    font-style: italic;
    border: 2px solid rgb(0, 0, 0);
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.4;
}

/* Quote highlighting - yellow background for actual quotes */
.quote-highlight, .quote {
    background-color: #ffff0061 !important;
    padding: 4px 8px !important;
    display: inline !important;
    font-weight: bold !important;
    font-family: "Helvetica Neue", Arial, sans-serif !important;
}

/* Timestamp styles within messages */
.message a, .bot-message a, .assistant-message a {
    color: rgb(0, 0, 0) !important;
    text-decoration: underline !important;
    font-weight: bold !important;
    cursor: pointer !important;
    padding: 2px 4px !important;
    border: 2px solid rgb(0, 0, 0) !important;
    display: inline-block !important;
    transition: background-color 0.2s ease !important;
    background-color: #ffffff !important;
    font-family: "Helvetica Neue", Arial, sans-serif !important;
    font-size: 16px !important;
}

/* Specific timestamp styling */
.timestamp, .message .timestamp, .bot-message .timestamp, .assistant-message .timestamp {
    color: rgb(0, 0, 0) !important;
    background-color: #ffff0061 !important;
    border: 2px solid rgb(0, 0, 0) !important;
    padding: 2px 6px !important;
    font-weight: bold !important;
    font-family: "Helvetica Neue", Arial, sans-serif !important;
    font-size: 16px !important;
    text-decoration: none !important;
    display: inline-block !important;
    margin: 0 2px !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}

.timestamp:hover, .message .timestamp:hover, .bot-message .timestamp:hover, .assistant-message .timestamp:hover {
    background-color: #ffff0080 !important;
}

.message a:hover, .bot-message a:hover, .assistant-message a:hover {
    background-color: rgb(220, 220, 220) !important;
}

/* Input focus styles */
.chat-input input:focus {
    outline: none;
    border-color: rgb(0, 0, 0);
    box-shadow: 0 0 0 1px rgb(0, 0, 0);
}

/* Button focus styles */
button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgb(0, 0, 0);
}

/* Responsive adjustments */

/* Desktop styles - aprovechar mejor el espacio horizontal */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px; /* Más ancho en pantallas grandes */
        padding: 30px;
    }
    
    .chat-container {
        padding: 30px;
        max-width: none;
    }
    
    .message {
        max-width: 90%; /* Más ancho en desktop */
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .container {
        max-width: 1000px;
        padding: 25px;
    }
    
    .message {
        max-width: 87%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
        max-width: none; /* En móvil usar todo el ancho */
    }
    
    .chat-container {
        height: 500px;
        padding: 15px;
    }
    
    .message {
        max-width: 90%;
        font-size: 16px;
    }
    
    .chat-input input {
        font-size: 16px;
        padding: 10px;
    }
    
    .chat-input button {
        font-size: 16px;
        padding: 10px 15px;
    }
} 