/* Colores modernos alusivos a tecnología */
:root {
    --primary-color: #0d6efd; /* Azul Bootstrap */
    --secondary-color: #6c757d; /* Gris Bootstrap */
    --tech-gradient: linear-gradient(135deg, #00c6ff, #0072ff);
}

body {
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

header {
    background: var(--tech-gradient);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.nav-link {
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--tech-gradient);
    border: none;
}

.btn-primary:hover {
    opacity: 0.9;
}

footer {
    background: var(--tech-gradient);
    color: white;
    margin-top: auto;
}

/* Estilos Markdown */
.markdown-content h2, .markdown-content h3 {
    color: #2c3e50;
    margin: 1.5rem 0 1rem;
}

.markdown-content ul {
    padding-left: 1.5rem;
    list-style-type: disc;
}

.markdown-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.markdown-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
}

.markdown-content pre code {
    background-color: transparent;
    padding: 0;
}

/* Spinner de carga */
.spinner-border {
    vertical-align: middle;
    margin-left: 8px;
}

/* Deshabilitar efecto hover cuando el botón está desactivado */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Historial de conversación */
.list-group-item {
    margin-bottom: 1rem;
    border-radius: 8px;
}

.user-message .markdown-content {
    background-color: #e9ecef;
    padding: 0.75rem;
    border-radius: 5px;
    margin: 0.5rem 0;
}

.assistant-response .markdown-content {
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-radius: 5px;
    margin: 0.5rem 0;
    border: 1px solid #dee2e6;
}

/* Contenedor principal */
.container-fluid.h-100 {
    height: calc(100vh - 150px) !important; /* Ajustar según tu header/footer */
}

/* Historial de conversación */
/*.conversation-history {
    min-height: 200px;
    padding: 1rem;
}*/

/* Área de entrada fija */
.message-input {
    padding-bottom: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

/* Tarjetas de conversación */
.card {
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    animation: highlight 0.5s ease;
}

.user-text {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
}

.assistant-text {
    background-color: #e9ecef;
    padding: 1rem;
    border-radius: 10px;
}

/* Textarea responsivo */
textarea.form-control {
    resize: none;
    min-height: 45px;
    max-height: 150px;
}

/* Panel lateral */
.sidebar {
    height: calc(100vh - 80px);
    overflow-y: auto;
    position: sticky;
    top: 80px;
}

.conversation-list {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

/* Área principal */
.main-content {
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}

.conversation-history {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Tarjetas de conversación */
.conversation-card {
    scroll-margin-top: 20px; /* Para el scroll al hacer clic */
    transition: all 0.3s ease;
}

.conversation-card:target {
    background-color: #f8f9fa;
    border-left: 4px solid #0d6efd;
    padding-left: 1rem;
}

@keyframes highlight {
    0% { transform: translateX(-10px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}
