/* ==========================================
   AI CHAT MODAL - Pantalla Completa (estilo Keno)
   Diseño alineado con tema metaverso púrpura/dorado
   ========================================== */

.ai-chat-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a0b2e 0%, #2d1450 50%, #1a0b2e 100%);
    z-index: 10000;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ai-chat-modal.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* Header del Chat - Estilo Dorado */
.ai-chat-header {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.1) 100%);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(20px);
}

.ai-chat-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: 700;
    font-size: 1.3rem;
    font-family: 'Roboto Condensed', sans-serif;
}

.ai-chat-header-title i {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}

.ai-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-chat-new-btn {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #FFD700;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.ai-chat-new-btn:hover {
    background: rgba(255, 215, 0, 0.25);
    border-color: rgba(255, 215, 0, 0.5);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.ai-chat-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.ai-chat-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

/* Contenedor Principal del Chat */
.ai-chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    overflow: hidden;
}

/* Área de Mensajes */
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 215, 0, 0.3) transparent;
}

.ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 3px;
}

.ai-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

/* Mensajes */
.ai-chat-message {
    max-width: 80%;
    padding: 16px 20px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.6;
    word-wrap: break-word;
    white-space: pre-wrap;
    animation: messageSlide 0.3s ease;
}

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

/* Mensaje del Usuario - Estilo Dorado */
.ai-chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a0b2e;
    font-weight: 500;
    border-bottom-right-radius: 6px;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.35);
}

/* Mensaje del Asistente - Glassmorfismo */
.ai-chat-message.assistant {
    align-self: flex-start;
    background: rgba(45, 20, 80, 0.6);
    color: #e8e4ef;
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-bottom-left-radius: 6px;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.ai-chat-message.typing {
    background: rgba(45, 20, 80, 0.4);
    color: #888;
}

.ai-chat-message.typing::after {
    content: '...';
    animation: typing 1s infinite;
}

@keyframes typing {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Sugerencias - Chips Dorados */
.ai-chat-suggestions {
    padding: 16px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    border-top: 1px solid rgba(255, 215, 0, 0.15);
}

.ai-chat-suggestion {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #FFD700;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.ai-chat-suggestion:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.25);
}

/* Input Container - Estilo Premium */
.ai-chat-input-container {
    padding: 20px 0;
    display: flex;
    gap: 12px;
    border-top: 1px solid rgba(255, 215, 0, 0.15);
}

.ai-chat-input {
    flex: 1;
    background: rgba(45, 20, 80, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 16px 24px;
    color: white;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(15px);
}

.ai-chat-input:focus {
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.15);
}

.ai-chat-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Botón Enviar - Gradiente Dorado */
.ai-chat-send {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.35);
}

.ai-chat-send:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(255, 215, 0, 0.5);
}

.ai-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ai-chat-send i {
    font-size: 22px;
    color: #1a0b2e;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .ai-chat-header {
        padding: 16px 20px;
    }
    
    .ai-chat-header-title {
        font-size: 1.1rem;
    }
    
    .ai-chat-body {
        padding: 0 16px;
    }
    
    .ai-chat-message {
        max-width: 90%;
        font-size: 14px;
        padding: 14px 18px;
    }
    
    .ai-chat-suggestion {
        font-size: 12px;
        padding: 8px 14px;
    }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .ai-chat-header {
        padding: 14px 16px;
    }
    
    .ai-chat-close {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .ai-chat-body {
        padding: 0 12px;
    }
    
    .ai-chat-messages {
        padding: 16px 0;
        gap: 12px;
    }
    
    .ai-chat-message {
        max-width: 95%;
        padding: 12px 16px;
    }
    
    .ai-chat-suggestions {
        padding: 12px 0;
        gap: 8px;
    }
    
    .ai-chat-suggestion {
        font-size: 11px;
        padding: 8px 12px;
    }
    
    .ai-chat-input-container {
        padding: 16px 0;
    }
    
    .ai-chat-input {
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .ai-chat-send {
        width: 48px;
        height: 48px;
    }
}
