/* Estilos para el chatbot EAPN */
.scroll-to-bottom-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #ffffff;
    color: #567389;
    border: 1px solid #567389;
}

.eapn-chatbot-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header del chatbot */
.eapn-chatbot-header {
    background: linear-gradient(360deg, #f8f9fa 0%, rgb(255 255 255));
    color: #567389;
    padding: 30px;
    text-align: center;
    position: relative;
}

.eapn-chatbot-title {
    margin: 0;
    font-size: 67px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 67px;
}

.eapn-chatbot-title .eapn {
    color: #567389;
    font-weight: 600;
}

.eapn-chatbot-title .chatbot {
    color: #567389;
    font-weight: 300;
    margin-left: 8px;
}

.eapn-chatbot-subtitle {
    margin: 15px 0 0 0;
    font-size: 21px;
    font-weight: 400;
    color: #567389;
    line-height: 1.5;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Área de conversación */
.eapn-chatbot-messages {
    height: 300px;
    overflow-y: auto;
    padding: 35px 30px;
    background: #f8f9fa;
    scroll-behavior: smooth;
}

/* Mensaje del usuario */
.eapn-user-message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 15px;
}

.eapn-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: url('../img/usuario.png') no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.eapn-user-bubble {     
    background: #567389;
    color: white;
    padding: 16px 22px;
    border-radius: 20px 20px 20px 6px;
    max-width: 70%;
    line-height: 1.6;
    font-size: 15px;
    box-shadow: 0 3px 10px rgba(44, 105, 129, 0.25);
}

/* Mensaje del chatbot */
.eapn-bot-message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 15px;
}

.eapn-bot-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: url('../img/eapn.png') no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.eapn-bot-bubble {
    background: #e6e6e6;
    color: #567389;
    padding: 22px 28px;
    border-radius: 20px 20px 20px 6px;
    width: 90%;
    line-height: 1.7;
    font-size: 15px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Estilos para el contenido del chatbot */
.eapn-bot-bubble h3 {
    margin: 0 0 18px 0;
    color: #2c3e50;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
}

.eapn-bot-bubble .info-proyecto {
    background: #e6e6e6;
    padding: 18px;
    border-radius: 10px;
    margin: 15px 0;
}

.eapn-bot-bubble .info-proyecto p {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.5;
}

.eapn-bot-bubble .info-proyecto strong {
    font-weight: 600;
}

.eapn-bot-bubble .info-proyecto span {
    color: #34495e;
}

/* Explicación técnica */
.eapn-bot-bubble .explicacion-tecnica {
    background: #d1d1d1;
    color: #2c3e50;
    padding: 12px 15px;
    border-radius: 6px;
    margin: 15px 0 0 0;
    font-size: 13px;
}

/* Criterio de selección */
.eapn-bot-bubble .criterio-seleccion {
    background: #f5f5f5;
    color: #856404;
    padding: 12px 15px;
    border-radius: 6px;
    margin: 15px 0 0 0;
    font-size: 13px;
    border-left: 4px solid #2c6981;
}

/* Proyectos descartados */
.eapn-bot-bubble .proyectos-descartados {
    background: #f5f5f5;
    color: #856404;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0 0 0;
    font-size: 13px;
    border-left: 4px solid #2c6981;
}

.eapn-bot-bubble .proyectos-descartados ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.eapn-bot-bubble .proyectos-descartados li {
    margin: 5px 0;
    line-height: 1.4;
}

.eapn-bot-bubble .proyectos-descartados a {
    color: #2c6981;
    text-decoration: none;
    font-weight: 500;
}

.eapn-bot-bubble .proyectos-descartados a:hover {
    text-decoration: underline;
}

/* Área de entrada */
.eapn-chatbot-input-area {
    padding: 28px 30px;
    background: #ffffff;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 8px;
    align-items: center;
}

.eapn-chatbot-input {
    flex: 1;
    padding: 16px 22px;
    border: 2px solid #e9ecef;
    border-radius: 28px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
    line-height: 1.4;
}

.eapn-chatbot-input:focus {
    border-color: #3498db;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.eapn-chatbot-input::placeholder {
    color: #95a5a6;
    font-style: italic;
}

.eapn-chatbot-send {
    width: 52px;
    height: 52px;
    border: none;
    background: #f8f9fa;
    color: #383838;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #666666;
    border-radius: 50%;
}

.eapn-chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    background: #ffffff;
    color: #ffffff;
}

.eapn-chatbot-send:active {
    transform: scale(0.95);
}

/* Mensaje de "pensando" */
.eapn-thinking {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    border-radius: 18px 18px 18px 4px;
    max-width: 400px;
    margin: 10px 0;
    color: #7f8c8d;
    font-style: italic;
}

.eapn-thinking .thinking-dots {
    display: flex;
    gap: 4px;
}

.eapn-thinking .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #bdc3c7;
    animation: thinking 1.4s infinite ease-in-out;
}

.eapn-thinking .dot:nth-child(1) { animation-delay: -0.32s; }
.eapn-thinking .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes thinking {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Scrollbar personalizado */
.eapn-chatbot-messages::-webkit-scrollbar {
    width: 8px;
}

.eapn-chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.eapn-chatbot-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.eapn-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive - Mejoras de legibilidad */
@media (max-width: 1200px) {
    .eapn-chatbot-container {
        max-width: 95%;
        margin: 10px auto;
    }
    
    .eapn-chatbot-messages {
        padding: 25px;
    }
    
    .eapn-bot-bubble {
        width: 85%;
        padding: 18px 22px;
    }
    
    .eapn-user-bubble {
        max-width: 75%;
        padding: 14px 18px;
    }
}

@media (max-width: 768px) {
    .eapn-chatbot-container {
        margin: 8px;
        border-radius: 10px;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    }
    
    .eapn-chatbot-header {
        padding: 25px 20px;
    }
    
    .eapn-chatbot-title {
        font-size: 28px;
        line-height: 32px;
        letter-spacing: 0.5px;
    }
    
    .eapn-chatbot-subtitle {
        font-size: 16px;
        line-height: 1.6;
        margin: 20px 0 0 0;
        padding: 0 10px;
    }
    
    .eapn-chatbot-messages {
        height: 450px;
        padding: 25px 20px;
    }
    
    .eapn-user-message,
    .eapn-bot-message {
        margin-bottom: 25px;
        gap: 10px;
    }
    
    .eapn-user-avatar,
    .eapn-bot-avatar {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .eapn-user-bubble {
        max-width: 80%;
        padding: 16px 20px;
        font-size: 15px;
        line-height: 1.5;
    }
    
    .eapn-bot-bubble {
        width: 85%;
        padding: 20px 22px;
        font-size: 15px;
        line-height: 1.6;
    }
    
    .eapn-bot-bubble h3 {
        font-size: 17px;
        margin: 0 0 18px 0;
        line-height: 1.4;
    }
    
    .eapn-bot-bubble .info-proyecto {
        padding: 18px;
        margin: 15px 0;
    }
    
    .eapn-bot-bubble .info-proyecto p {
        margin: 10px 0;
        font-size: 14px;
        line-height: 1.5;
    }
    
    .eapn-chatbot-input-area {
        padding: 25px 20px;
        gap: 8px;
    }
    
    .eapn-chatbot-input {
        padding: 16px 20px;
        font-size: 16px;
        border-radius: 28px;
        line-height: 1.4;
    }
    
    .eapn-chatbot-send {
        width: 48px;
        height: 48px;
        font-size: 18px;
        border-radius: 50%;
    }
    
    .eapn-thinking {
        max-width: 350px;
        padding: 6px;
        font-size: 14px;
        margin: 0px !important;
    }
}

@media (max-width: 480px) {
    .eapn-chatbot-container {
        margin: 5px;
        border-radius: 8px;
    }
    
    .eapn-chatbot-header {
        padding: 20px 15px;
    }
    
    .eapn-chatbot-title {
        font-size: 24px;
        line-height: 28px;
    }
    
    .eapn-chatbot-subtitle {
        font-size: 15px;
        padding: 0 5px;
    }
    
    .eapn-chatbot-messages {
        height: 400px;
        padding: 20px 15px;
    }
    
    .eapn-user-message,
    .eapn-bot-message {
        margin-bottom: 20px;
        gap: 8px;
    }
    
    .eapn-user-avatar,
    .eapn-bot-avatar {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .eapn-user-bubble {
        max-width: 85%;
        padding: 14px 18px;
        font-size: 14px;
    }
    
    .eapn-bot-bubble {
        width: 90%;
        padding: 18px 20px;
        font-size: 14px;
    }
    
    .eapn-bot-bubble h3 {
        font-size: 16px;
        margin: 0 0 15px 0;
    }
    
    .eapn-bot-bubble .info-proyecto {
        padding: 15px;
        margin: 12px 0;
    }
    
    .eapn-bot-bubble .info-proyecto p {
        margin: 8px 0;
        font-size: 13px;
    }
    
    .eapn-chatbot-input-area {
        padding: 20px 15px;
        gap: 6px;
    }
    
    .eapn-chatbot-input {
        padding: 14px 18px;
        font-size: 15px;
    }
    
    .eapn-chatbot-send {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
    
    .eapn-thinking {
        max-width: 300px;
        padding: 6px;
        font-size: 13px;
        margin: 0px !important;
    }
}

@media (max-width: 360px) {
    .eapn-chatbot-header {
        padding: 15px 10px;
    }
    
    .eapn-chatbot-title {
        font-size: 22px;
        line-height: 26px;
    }
    
    .eapn-chatbot-subtitle {
        font-size: 14px;
    }
    
    .eapn-chatbot-messages {
        padding: 15px 10px;
    }
    
    .eapn-user-bubble {
        max-width: 90%;
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .eapn-bot-bubble {
        width: 92%;
        padding: 16px 18px;
        font-size: 13px;
    }
    
    .eapn-chatbot-input-area {
        padding: 15px 10px;
    }
    
    .eapn-chatbot-input {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .eapn-chatbot-send {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }
}

/* Estados de carga */
.eapn-chatbot-input:disabled,
.eapn-chatbot-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Animaciones de entrada */
.eapn-user-message,
.eapn-bot-message {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 