﻿.bloque-asesoria-latam {
    background-color: #f8f9fa;
    border-left: 4px solid #343a40; /* gris oscuro */
    padding: 16px 20px;
    margin-top: 25px;
    border-radius: 8px;
    font-size: 15px;
}

    .bloque-asesoria-latam h4 {
        margin-top: 0;
        font-weight: bold;
        color: #343a40;
    }

    .bloque-asesoria-latam ul {
        margin: 10px 0 0;
        padding-left: 20px;
    }



.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

    .btn-secondary:hover {
        background-color: #5a6268;
        color: white;
    }




.input-inner {
    display: flex;
    align-items: flex-end;
    position: relative;
    width: 100%;
}

#user-input, #initial-textarea {
    padding-right: 120px;
}


.input-group-btn input[type=file] {
    display: none;
}

#nombreArchivoModal {
    background-color: #f9f9f9;
}

/* Estilo base del botón subir archivo */
.upload-button {
    width: 40px;
    height: 40px;
    background-color: #0a57eb;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    /* 🔥 QUITAR ESTO:
                            position: absolute;
                            */
    transition: background-color 0.3s, transform 0.3s;
}


    .upload-button:hover {
        background-color: #0948c7;
    }

    /* Animación de rotación al icono */
    .upload-button i {
        transition: transform 0.3s ease;
    }

    .upload-button:hover i {
        transform: rotate(20deg);
    }

.enlace-articulo {
    color: #0a57eb;
    text-decoration: underline;
    cursor: pointer;
}
/* Estilo base del summary */
.bibliografia details summary {
    position: relative;
    padding-left: 20px; /* espacio para la flecha */
    list-style: none; /* quita el triángulo nativo */
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

.user {
    white-space: pre-line;
}

/* Estilo para detalles de nivel "relevancia" */
.bibliografia details.nivel-relevancia > summary {
    font-weight: bold;
    margin-top: 14px;
    padding-left: 20px;
    position: relative;
}

    /* Flecha ▶ en relevancia */
    .bibliografia details.nivel-relevancia > summary::before {
        content: "▶";
        position: absolute;
        left: 0;
        font-size: 14px;
        transition: transform 0.2s ease;
    }

/* Abierto: flecha hacia abajo */
.bibliografia details.nivel-relevancia[open] > summary::before {
    transform: rotate(90deg);
}

.bibliografia details.nivel-articulo {
    margin-left: 24px; /* Aumenta la indentación */
    margin-top: 2px; /* Reduce espacio entre padre e hijo */
    margin-bottom: 4px; /* Menor espacio entre artículos */
}

.bibliografia details.nivel-articulo {
    margin-left: 80px; /* <-- aquí la indentación visual */
}

    .bibliografia details.nivel-articulo > summary {
        font-weight: normal;
        font-size: 15px;
        padding-left: 24px; /* espacio para la flecha + texto */
        position: relative;
    }

        .bibliografia details.nivel-articulo > summary::before {
            content: "▶";
            position: absolute;
            left: 0;
            font-size: 13px;
            transition: transform 0.2s ease;
        }

    .bibliografia details.nivel-articulo[open] > summary::before {
        transform: rotate(90deg);
    }



/* Agrega una flecha ▶ al inicio usando ::before */
.bibliografia details summary::before {
    content: "▶";
    position: absolute;
    left: 0;
    transition: transform 0.3s ease;
    font-size: 14px;
}

/* Cuando está abierto, rota la flecha para que apunte hacia abajo ▼ */
.bibliografia details[open] summary::before {
    transform: rotate(90deg); /* ▶ se convierte en ▼ */
}



.bibliografia details > p {
    margin-left: 10px;
    font-size: 15px;
    color: #444;
}

details summary {
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    margin-bottom: 6px;
}

details > p {
    margin: 0 0 10px 10px;
}

#credit-info {
    margin-top: 10px;
    font-size: 14px;
    color: #6b7280;
    text-align: center;
}

    #credit-info a {
        color: #0a57eb;
        font-weight: 500;
    }

.typing-indicator {
    font-size: 16px;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #6b7280;
    border-radius: 50%;
    animation: blink 1.4s infinite both;
}

    .typing-dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .typing-dot:nth-child(3) {
        animation-delay: 0.4s;
    }

@@keyframes blink {
    0% {
        opacity: 0.2;
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0.2;
    }
}

/* Aplica solo al contenido del bot */
.bot h3 {
    font-size: 20px;
    font-weight: bold;
    margin: 16px 0 10px;
    color: #0a57eb;
}

.bot h4 {
    font-size: 18px;
    font-weight: bold;
    margin: 14px 0 8px;
    color: #374151;
}

.bot p {
    font-size: 16px;
    line-height: 1.6;
    margin: 8px 0;
    color: #333;
}

.bot strong {
    font-weight: bold;
    color: #111827;
}

.bot ol,
.bot ul {
    padding-left: 20px;
    margin: 10px 0 16px;
    font-size: 16px;
    line-height: 1.6;
}

.bot li {
    margin-bottom: 6px;
}

.bot p {
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.6;
}

.bot strong {
    font-size: 18px;
    font-weight: bold;
    display: block;
    margin-bottom: 6px;
}

.bot ol,
.bot ul {
    margin-left: 24px;
    margin-bottom: 16px;
    padding-left: 10px;
    font-size: 16px;
    line-height: 1.5;
}

.bot li {
    margin-bottom: 6px;
}

.bot h3,
.bot h4 {
    font-weight: bold;
    margin: 16px 0 10px;
}

.bot em {
    font-style: italic;
    color: #555;
}

/* Reset y estilos base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    min-height: 100vh;
    overflow-y: auto;
}

    /* Vista inicial centrada */
    body.initial-mode {
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: #ffffff;
    }

#initial-container {
    text-align: center;
    width: 100%;
    max-width: 600px;
    padding: 20px;
    display: none;
}

#initial-textarea {
    width: 100%;
    padding: 12px 50px 12px 16px;
    border: none;
    border-radius: 8px;
    resize: none;
    background-color: #f9f9f9;
    font-size: 16px;
    outline: none;
    min-height: 60px;
    max-height: 150px;
    overflow-y: auto;
}

#initial-send {
    background-color: #0a57eb;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* 🔥 SIN position: absolute */
}


    #initial-send:disabled {
        background-color: #9ca3af;
        cursor: not-allowed;
    }

.initial-input-wrapper {
    position: relative;
    margin-top: 15px;
}

/* Vista principal del chat */
.chat-container {
    display: none;
    flex-direction: column;
    height: 100vh;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    min-height: 100%;
}

.chat-header {
    padding: 15px 20px;
    text-align: center;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
    margin-top: 60px; /* Añade este margen para separar del header */
}

#chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 15px 10px;
    padding-bottom: 120px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - 150px);
}

.user {
    background-color: #e1f0fe;
    color: #0a57eb;
    padding: 10px 16px;
    border-radius: 12px 12px 0 12px;
    max-width: 85%;
    align-self: flex-end;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    word-wrap: break-word;
}

.bot {
    color: #202124;
    padding: 8px 0 8px 16px;
    background-color: transparent;
    max-width: 90%;
    align-self: flex-start;
    white-space: pre-wrap;
    border-left: 2px solid #e1f0fe;
    word-wrap: break-word;
}

.input-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    padding: 12px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 12px 12px 0 0;
}

#user-input {
    width: 100%;
    padding: 12px 50px 12px 16px;
    font-size: 16px;
    line-height: 1.5;
    background-color: #f9f9f9;
    border: none;
    border-radius: 8px;
    outline: none;
    resize: none;
    min-height: 60px;
    max-height: 150px;
    overflow-y: auto;
}

#send-message {
    background-color: #0a57eb;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    position: absolute;
    right: 16px;
    bottom: 16px;
}

    #send-message:hover {
        background-color: #0948c7;
    }

    #send-message:disabled {
        background-color: #9ca3af;
        cursor: not-allowed;
    }



#file-upload {
    display: none;
}

.thinking-container {
    display: inline-flex;
    align-items: center;
    background-color: #f0f0f0;
    border-radius: 18px;
    padding: 12px 16px;
    max-width: 85%;
    margin: 5px 0;
}

.thinking-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 3px solid #000;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}

@@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Scrollbar personalizada */
#chat-box::-webkit-scrollbar {
    width: 6px;
}

#chat-box::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#chat-box::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

    #chat-box::-webkit-scrollbar-thumb:hover {
        background: #9ca3af;
    }

.button-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

/* Ajuste al botón de enviar */
#send-message {
    background-color: #0a57eb;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

    #send-message:hover {
        background-color: #0948c7;
    }

    #send-message:disabled {
        background-color: #9ca3af;
        cursor: not-allowed;
    }

/* Eliminar cualquier position absolute que tenías antes */
.upload-button, #send-message {
    position: static !important;
}
/* Estilos para la nueva cabecera */
.main-header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: 60px;
}

.logo-img {
    height: 40px;
    margin-top: 10px;
}

.navbar-default {
    background-color: white;
    border: none;
    margin-bottom: 0;
    min-height: 60px;
}

    .navbar-default .navbar-nav > li > a {
        color: #333;
        font-weight: 500;
        padding: 20px 15px;
        transition: color 0.3s;
    }

        .navbar-default .navbar-nav > li > a:hover {
            color: #0a57eb;
        }

.navbar-toggle {
    margin-top: 13px;
}

/* Ajustes para el contenedor principal */
body {
    padding-top: 60px; /* Para compensar la altura de la cabecera fija */
}

/* Ajustes para móvil */
@@media (max-width: 767px) {
    .navbar-default .navbar-nav > li > a {
        padding: 10px 15px;
    }

    .navbar-collapse {
        background-color: white;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    /* Ajuste para el chat en móvil */
    .chat-container {
        max-width: 100%;
    }

    .input-container {
        max-width: 100%;
    }
}
