/* custom_styles.css - Estilos personalizados con variables */

/* Variables (con valores por defecto si no se definen desde admin) */
:root {
    --primary-color: #2563EB;
    /* Azul Rey por defecto */
    --secondary-color: #1E40AF;
    /* Azul Oscuro */
    --accent-color: #ff6b6b;
    /* Rojo/Coral */
}

/* Welcome Modal - Dark Glassmorphism Premium */
.welcome-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 16px;
}

.welcome-modal {
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.25);
    padding: 2rem 1.75rem;
    border-radius: 24px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
    transform: translateY(20px);
    transition: transform 0.5s ease;
    font-family: 'Segoe UI', system-ui, sans-serif;
    scrollbar-width: none;
}

.welcome-modal::-webkit-scrollbar { display: none; }

/* Logo */
.welcome-logo {
    margin-bottom: 1rem;
    animation: floatLogo 3s ease-in-out infinite;
}
@keyframes floatLogo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Títulos */
.welcome-title {
    color: #f1f5f9;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.welcome-subtitle {
    color: rgba(148, 163, 184, 0.9);
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0 0 1.25rem 0;
}

/* Divider */
.welcome-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1.25rem 0 1rem;
    color: rgba(139, 92, 246, 0.8);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.welcome-divider::before, .welcome-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(139, 92, 246, 0.25);
}

/* Grid de features del tour */
.welcome-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.welcome-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 12px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    transition: background 0.3s;
}

.welcome-card:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.25);
}

.welcome-card-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.welcome-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.welcome-card-text strong {
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 700;
}

.welcome-card-text span {
    color: rgba(148, 163, 184, 0.8);
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Sección CristoBot */
.welcome-bot-section {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 1rem;
    text-align: left;
    margin-bottom: 1.25rem;
}

.welcome-bot-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.75rem;
}

.welcome-bot-badge {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.welcome-bot-tag {
    color: rgba(139, 92, 246, 0.8);
    font-size: 0.72rem;
    font-weight: 600;
}

.welcome-bot-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0.75rem;
}

.welcome-bot-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: rgba(203, 213, 225, 0.9);
    line-height: 1.4;
}

.welcome-bot-item strong {
    color: #c4b5fd;
}

.welcome-bot-hint {
    background: rgba(99, 102, 241, 0.12);
    border: 1px dashed rgba(99, 102, 241, 0.35);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.78rem;
    color: rgba(167, 139, 250, 0.9);
    text-align: center;
    line-height: 1.5;
}

.welcome-bot-hint strong {
    color: #a78bfa;
}

/* Botón de inicio */
.start-tour-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 13px 36px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    letter-spacing: 0.5px;
    width: 100%;
    margin-bottom: 1rem;
}

.start-tour-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.5);
    filter: brightness(1.1);
}

/* Créditos */
.welcome-credits {
    color: rgba(100, 116, 139, 0.7);
    font-size: 0.72rem;
    margin: 0;
}

.welcome-credits a {
    color: rgba(139, 92, 246, 0.7);
    text-decoration: none;
    font-weight: 600;
}

.welcome-credits a:hover {
    color: #a78bfa;
}

/* Mobile */
@media (max-width: 480px) {
    .welcome-modal { padding: 1.5rem 1.25rem; }
    .welcome-title { font-size: 1.3rem; }
    .welcome-grid { gap: 8px; }
    .welcome-card { padding: 10px 8px; }
    .welcome-card-icon { font-size: 1.4rem; }
}

/* FAB Styles */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}

.like-fab,
.share-fab,
.guide-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.like-fab {
    background: var(--accent-color);
}

.share-fab {
    background: #4ecdc4;
}

.guide-fab {
    background: var(--primary-color);
    font-size: 30px;
}

.like-fab:hover,
.share-fab:hover,
.guide-fab:hover {
    transform: scale(1.1);
}

.like-count {
    font-size: 12px;
    margin-top: -5px;
}

.like-fab.liked {
    animation: heartBeat 0.5s;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.floating-heart {
    position: fixed;
    color: var(--accent-color);
    font-size: 24px;
    pointer-events: none;
    animation: floatUp 1.5s ease-out forwards;
    z-index: 1001;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
}

.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    z-index: 2000;
    animation: fadeInOut 3s ease forwards;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, 20px);
    }

    10% {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    90% {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
}

/* ========================================
   MODO VOZ Y DISEÑO PREMIUM (GLASSMORPHISM)
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&display=swap');

.chat-window.modern-design {
    position: fixed;
    width: 380px;
    height: 650px;
    background: rgba(18, 18, 24, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    bottom: 25px;
    right: 25px;
    border-radius: 28px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    font-family: 'Outfit', system-ui, sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.chat-window.modern-design.hidden {
    transform: translateY(40px) scale(0.9);
    opacity: 0;
    pointer-events: none;
}

/* --- HEADER SUPERIOR --- */
.chat-header-top {
    background: transparent;
    color: white;
    padding: 20px 20px 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-branding .svg-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 50%;
    padding: 2px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.chat-title-text {
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.chat-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* --- CONTROLES --- */
.chat-header-controls {
    background: transparent;
    padding: 0 20px 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mode-switch-container {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 30px;
    padding: 4px;
    display: flex;
    gap: 4px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.mode-switch-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mode-switch-btn.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Botón modo conversación */
.conv-mode-btn {
    padding: 8px 12px;
    font-size: 12px;
}

.conv-mode-btn.active {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
    animation: convBtnPulse 2s infinite ease-in-out;
}

@keyframes convBtnPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(16, 185, 129, 0.7); }
}

.modern-lang-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: background 0.2s;
}
.modern-lang-select:hover {
    background: rgba(255, 255, 255, 0.15);
}
.modern-lang-select option {
    background: #1e1e2e;
    color: white;
}

/* --- MENSAJES --- */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}
.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.message-group {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.message-group.user {
    flex-direction: row-reverse;
}

.message-avatar-small {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 50%;
    padding: 2px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.message-content-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.message-sender-name {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.message-group.user .message-sender-name {
    margin-left: 0;
    margin-right: 4px;
    text-align: right;
}

.message {
    padding: 14px 18px;
    border-radius: 20px;
    font-size: 14.5px;
    line-height: 1.5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.message.bot-bubble {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom-left-radius: 4px;
    backdrop-filter: blur(10px);
}

.message.user-bubble {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Typing indicator */
.typing-indicator {
    padding: 12px 16px;
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border-bottom-left-radius: 4px;
    width: fit-content;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

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

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* --- INPUT AREA --- */
.modern-input-area {
    background: rgba(0, 0, 0, 0.2);
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
}

.input-pill-container {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    padding: 6px 6px 6px 18px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.input-pill-container:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14.5px;
    color: white;
    width: 100%;
}
.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.voice-mic-icon {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.voice-mic-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.voice-mic-icon.listening {
    background: #ef4444;
    color: white;
    animation: pulseMicSmall 1.5s infinite;
}

@keyframes pulseMicSmall {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.modern-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.modern-send-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.modern-send-btn:active {
    transform: scale(0.95);
}

/* --- BOTÓN MICRÓFONO GIGANTE PREMIUM (MODO VOZ) --- */
.big-voice-mic-btn {
    display: none;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    color: white;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin: 20px auto;
    position: relative;
    z-index: 2;
}

.big-voice-mic-btn svg {
    width: 40px;
    height: 40px;
    transition: transform 0.3s;
}

.big-voice-mic-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.big-voice-mic-btn:active {
    transform: scale(0.95);
}

.big-voice-mic-btn.listening {
    background: linear-gradient(135deg, #ef4444, #f43f5e);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
    animation: pulseMicBig 2s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}

.big-voice-mic-btn.listening svg {
    animation: floatIcon 2s infinite ease-in-out;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes pulseMicBig {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6), 0 10px 30px rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 25px rgba(239, 68, 68, 0), 0 10px 30px rgba(239, 68, 68, 0.4); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0), 0 10px 30px rgba(239, 68, 68, 0.4); }
}

/* Estado activo en el input area: Mostrar el boton grande y centrar */
.modern-input-area.voice-mode-active {
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
    background: transparent;
    border-top: none;
    position: relative;
}

.modern-input-area.voice-mode-active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

.modern-input-area.voice-mode-active .input-pill-container,
.modern-input-area.voice-mode-active .modern-send-btn {
    display: none !important;
}

.modern-input-area.voice-mode-active .big-voice-mic-btn {
    display: flex !important;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .chat-window.modern-design {
        width: 100% !important;
        max-width: 100% !important;
        height: 60vh !important;
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        border-radius: 30px 30px 0 0 !important;
        background: rgba(18, 18, 24, 0.9);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    }

    .chat-header-top {
        padding: 20px 24px 10px 24px;
    }

    .chat-header-controls {
        padding: 0 24px 15px 24px;
    }

    .chat-messages {
        padding: 20px 24px;
    }

    .modern-input-area {
        padding: 16px 24px 24px 24px;
    }

    /* Ajuste de FABs */
    .chat-window:not(.hidden)~.fab-container {
        bottom: calc(60vh + 20px);
    }
}

/* --- Side Tab Trigger (Cristobot) --- */
.chat-trigger-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    border-radius: 20px 0 0 20px;
    padding: 25px 12px;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-trigger-tab:hover {
    background: rgba(99, 102, 241, 0.85);
    padding-right: 18px;
    box-shadow: -8px 0 35px rgba(99, 102, 241, 0.3);
}

.chat-trigger-tab span {
    writing-mode: vertical-lr;
    text-orientation: mixed;
    transform: rotate(180deg);
    color: white;
    font-weight: 800;
    letter-spacing: 3px;
    font-size: 13px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    user-select: none;
}

.chat-trigger-tab.hidden {
    right: -100px;
    opacity: 0;
    pointer-events: none;
}

/* Ajuste Mobile */
@media (max-width: 768px) {
    .chat-trigger-tab {
        padding: 20px 8px;
    }
    .chat-trigger-tab span {
        letter-spacing: 1px;
        font-size: 11px;
    }
}

/* Pestaña en modo conversación activo */
.chat-trigger-tab.conversation-active {
    background: rgba(99, 102, 241, 0.7);
    border-color: rgba(139, 92, 246, 0.4);
    animation: tabPulse 2s infinite ease-in-out;
}

.chat-trigger-tab.conversation-active:hover {
    background: rgba(239, 68, 68, 0.8);
}

@keyframes tabPulse {
    0%, 100% { 
        opacity: 1; 
        box-shadow: -5px 0 25px rgba(99, 102, 241, 0.4); 
    }
    50% { 
        opacity: 0.6; 
        box-shadow: -5px 0 35px rgba(139, 92, 246, 0.6); 
    }
}

/* Ocultar FABs antiguos por CSS por seguridad */
.fab-container {
    display: none !important;
}

/* --- Conversation Overlay (Modo Conversación Flotante) --- */
.conversation-overlay {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 10002;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.conversation-overlay.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.conversation-status {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px 20px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: convPulse 2s infinite ease-in-out;
}

@keyframes convPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(99, 102, 241, 0.4); }
}

.conversation-mic-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
    transition: all 0.3s ease;
}

.conversation-mic-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 35px rgba(99, 102, 241, 0.6);
}

.conversation-mic-btn.listening {
    background: linear-gradient(135deg, #ef4444, #f43f5e);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.5);
    animation: convMicPulse 2s infinite ease-in-out;
}

@keyframes convMicPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5), 0 8px 30px rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0), 0 8px 30px rgba(239, 68, 68, 0.4); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0), 0 8px 30px rgba(239, 68, 68, 0.4); }
}

.conversation-close-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 6px 18px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.conversation-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}