/**
 * Estilos del chat frontend de Alvi
 *
 * @package Alvi
 * @since 1.0.0
 */

/* Variables CSS para temas */
:root {
    /* Tema claro */
    --alvi-bg-primary: #ffffff;
    --alvi-bg-secondary: #f8f9fa;
    --alvi-bg-tertiary: #e9ecef;
    --alvi-text-primary: #333333;
    --alvi-text-secondary: #666666;
    --alvi-text-muted: #999999;
    --alvi-border: #dee2e6;
    --alvi-border-light: #f1f3f4;
    --alvi-accent: #0073aa;
    --alvi-accent-hover: #005a87;
    --alvi-success: #46b450;
    --alvi-warning: #ffb900;
    --alvi-danger: #dc3232;
    --alvi-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --alvi-shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
    --alvi-radius: 8px;
    --alvi-radius-sm: 4px;
    --alvi-transition: all 0.2s ease;
    --alvi-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Tema oscuro */
/* THEME: Dark Gold */
.alvi-theme-dark-gold {
    --alvi-bg-primary: rgba(10,10,10,0.55);
    --alvi-bg-secondary: rgba(24,24,24,0.6);
    --alvi-bg-tertiary: rgba(38,38,38,0.6);
    --alvi-text-primary: #F7F3E9;
    --alvi-text-secondary: #D6C99A;
    --alvi-text-muted: #A08F5B;
    --alvi-border: rgba(214,201,154,0.25);
    --alvi-border-light: rgba(214,201,154,0.15);
    --alvi-accent: #C8A951;
    --alvi-accent-hover: #B4933F;
    --alvi-shadow: 0 8px 32px rgba(0,0,0,0.45);
    --alvi-shadow-hover: 0 12px 40px rgba(0,0,0,0.6);
}
.alvi-theme-dark-gold .alvi-chat-container { background: rgba(15, 15, 15, 0.35); border: 1px solid rgba(200, 169, 81, 0.25); }
.alvi-theme-dark-gold .alvi-ai-avatar { background: var(--alvi-accent); }
.alvi-theme-dark-gold .alvi-message-user .alvi-message-body { background: var(--alvi-accent); color: #0d0d0d; }
.alvi-theme-dark-gold .alvi-message-body { background: var(--alvi-bg-secondary); }

/* THEME: Dark Gray */
.alvi-theme-dark-gray {
    --alvi-bg-primary: rgba(17,17,17,0.6);
    --alvi-bg-secondary: rgba(28,28,28,0.6);
    --alvi-bg-tertiary: rgba(48,48,48,0.6);
    --alvi-text-primary: #E5E7EB;
    --alvi-text-secondary: #9CA3AF;
    --alvi-text-muted: #6B7280;
    --alvi-border: rgba(75,85,99,0.35);
    --alvi-border-light: rgba(55,65,81,0.2);
    --alvi-accent: #4B5563;
    --alvi-accent-hover: #374151;
    --alvi-shadow: 0 8px 32px rgba(0,0,0,0.45);
    --alvi-shadow-hover: 0 12px 40px rgba(0,0,0,0.6);
}
.alvi-theme-dark-gray .alvi-chat-container { background: rgba(20, 20, 20, 0.35); border: 1px solid rgba(75,85,99,0.35); }
.alvi-theme-dark-gray .alvi-ai-avatar { background: var(--alvi-accent); }
.alvi-theme-dark-gray .alvi-message-user .alvi-message-body { background: var(--alvi-accent); color: #111827; }
.alvi-theme-dark-gray .alvi-message-body { background: var(--alvi-bg-secondary); }

/* THEME: Light (default) */
.alvi-theme-light {
    --alvi-bg-primary: rgba(255,255,255,0.10);
    --alvi-bg-secondary: rgba(248,249,250,0.6);
    --alvi-bg-tertiary: rgba(233,236,239,0.6);
    --alvi-text-primary: #333333;
    --alvi-text-secondary: #4B5563;
    --alvi-text-muted: #6B7280;
    --alvi-border: rgba(209,213,219,0.6);
    --alvi-border-light: rgba(229,231,235,0.6);
    --alvi-accent: #2563EB;
    --alvi-accent-hover: #1D4ED8;
    --alvi-shadow: 0 8px 32px rgba(0,0,0,0.25);
    --alvi-shadow-hover: 0 12px 40px rgba(0,0,0,0.35);
}

/* THEME: Light Gray */
.alvi-theme-light-gray {
    --alvi-bg-primary: rgba(255,255,255,0.85);
    --alvi-bg-secondary: rgba(243,244,246,0.9);
    --alvi-bg-tertiary: rgba(229,231,235,0.9);
    --alvi-text-primary: #111827;
    --alvi-text-secondary: #374151;
    --alvi-text-muted: #6B7280;
    --alvi-border: rgba(209,213,219,1);
    --alvi-border-light: rgba(229,231,235,1);
    --alvi-accent: #6B7280;
    --alvi-accent-hover: #4B5563;
    --alvi-shadow: 0 8px 32px rgba(0,0,0,0.15);
    --alvi-shadow-hover: 0 12px 40px rgba(0,0,0,0.25);
}

/* Reset y base */
.alvi-chat-container * {
    box-sizing: border-box;
}

.alvi-chat-container {
    font-family: var(--alvi-font-family);
    display: flex;
    flex-direction: column;
    color: var(--alvi-text-primary);
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--alvi-transition);
    position: relative;
}

/* Fondo animado sutil */
.alvi-chat-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(1200px 800px at 10% 10%, rgba(255,215,0,0.08), transparent 60%),
                radial-gradient(1000px 600px at 90% 20%, rgba(0,123,255,0.08), transparent 60%),
                radial-gradient(800px 800px at 50% 80%, rgba(40,167,69,0.08), transparent 60%);
    animation: alvi-bg-move 12s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes alvi-bg-move {
    0% { transform: translate3d(0,0,0) scale(1); }
    100% { transform: translate3d(10px, -10px, 0) scale(1.02); }
}

/* Asegurar layering del contenido */
.alvi-chat-header, .alvi-chat-body { position: relative; z-index: 1; }


/* Header del chat */
.alvi-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--alvi-bg-secondary);
    border-bottom: 1px solid var(--alvi-border);
}

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

.alvi-logo {
    width: 32px;
    height: 32px;
    transition: filter 0.3s ease;
}

/* Filtros para el logo según el tema */
/* Temas claros - invertir colores para que el logo blanco se vea negro */
.alvi-theme-light .alvi-logo,
.alvi-theme-light-gray .alvi-logo {
    filter: invert(1) brightness(0) contrast(100%);
}

/* Temas oscuros - mantener colores originales */
.alvi-theme-dark-gold .alvi-logo,
.alvi-theme-dark-gray .alvi-logo {
    filter: none;
}

.alvi-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--alvi-text-primary);
}

.alvi-chat-controls {
    display: flex;
    gap: 8px;
}

/* Body del chat */
.alvi-chat-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* Menú de temas */
.alvi-theme-menu {
    position: fixed;
    background: var(--alvi-bg-primary);
    border: 1px solid var(--alvi-border);
    border-radius: var(--alvi-radius);
    box-shadow: var(--alvi-shadow-hover);
    min-width: 160px;
    z-index: 99999;
    padding: 6px 0;
    display: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.alvi-theme-menu.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.alvi-theme-option {
    display: block;
    padding: 8px 12px;
    color: var(--alvi-text-primary);
    text-decoration: none;
    font-size: 12px;
    outline: none;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    transition: background-color 0.2s ease;
    font-family: inherit;
}

.alvi-theme-option:hover,
.alvi-theme-option:focus,
.alvi-theme-option:focus-visible {
    background: var(--alvi-bg-secondary);
    color: var(--alvi-text-primary);
}

.alvi-theme-option:active {
    background: var(--alvi-accent);
    color: white;
}

/* Sidebar */
.alvi-chat-sidebar {
    width: 280px;
    background: var(--alvi-bg-secondary);
    border-right: 1px solid var(--alvi-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-height: 100%;
}

.alvi-sidebar-section {
    padding: 16px;
}

.alvi-sidebar-top {
    border-bottom: 1px solid var(--alvi-border);
}

.alvi-sidebar-middle {
    flex: 1;
    overflow-y: auto;
    border-bottom: 1px solid var(--alvi-border);
}

.alvi-sidebar-bottom {
    background: var(--alvi-bg-tertiary);
}

.alvi-sidebar-title {
    margin: 0 0 12px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--alvi-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Lista de conversaciones */
.alvi-conversations-list {
    max-height: 300px;
    overflow-y: auto;
}

.alvi-conversation-item {
    padding: 12px;
    border-radius: var(--alvi-radius-sm);
    cursor: pointer;
    transition: var(--alvi-transition);
    margin-bottom: 4px;
}

.alvi-conversation-item:hover {
    background: var(--alvi-bg-tertiary);
}

.alvi-conversation-item.active {
    background: var(--alvi-accent);
    color: white;
}

.alvi-conversation-preview {
    font-size: 13px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alvi-conversation-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--alvi-text-muted);
}

.alvi-no-conversations {
    text-align: center;
    color: var(--alvi-text-muted);
    font-style: italic;
    padding: 20px;
}

/* Perfil de usuario */
.alvi-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.alvi-user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.alvi-user-info {
    flex: 1;
}

.alvi-user-name {
    font-weight: 500;
    font-size: 14px;
}

.alvi-user-status {
    font-size: 12px;
    color: var(--alvi-success);
}

.alvi-user-menu {
    position: relative;
}

.alvi-user-menu-dropdown {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: var(--alvi-bg-primary);
    border: 1px solid var(--alvi-border);
    border-radius: var(--alvi-radius);
    box-shadow: var(--alvi-shadow);
    min-width: 180px;
    z-index: 9999;
}

.alvi-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--alvi-text-primary);
    transition: var(--alvi-transition);
    border-bottom: 1px solid var(--alvi-border-light);
}

.alvi-menu-item:last-child {
    border-bottom: none;
}

.alvi-menu-item:hover {
    background: var(--alvi-bg-secondary);
}

.alvi-menu-separator {
    height: 1px;
    background: var(--alvi-border);
    margin: 4px 0;
}

/* Información de uso */
.alvi-usage-stats {
    background: var(--alvi-bg-primary);
    border-radius: var(--alvi-radius-sm);
    padding: 12px;
}

.alvi-usage-title {
    margin: 0 0 12px 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--alvi-text-secondary);
}

.alvi-usage-item {
    margin-bottom: 12px;
}

.alvi-usage-item:last-child {
    margin-bottom: 8px;
}

.alvi-usage-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 11px;
}

.alvi-usage-count {
    color: var(--alvi-text-muted);
}

.alvi-usage-bar {
    height: 4px;
    background: var(--alvi-border);
    border-radius: 2px;
    overflow: hidden;
}

.alvi-usage-progress {
    height: 100%;
    background: var(--alvi-accent);
    transition: width 0.3s ease;
}

.alvi-usage-reset {
    font-size: 10px;
    color: var(--alvi-text-muted);
    text-align: center;
}

/* Área principal del chat */
.alvi-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Contenedor de mensajes */
.alvi-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scroll-behavior: smooth;
}

.alvi-messages-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Mensajes */
.alvi-message {
    display: flex;
    gap: 12px;
    max-width: 80%;
}

.alvi-message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.alvi-message-ai {
    align-self: flex-start;
}

.alvi-message-avatar {
    flex-shrink: 0;
}

.alvi-message-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.alvi-ai-avatar {
    width: 32px;
    height: 32px;
    background: var(--alvi-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.alvi-message-content {
    flex: 1;
    min-width: 0;
}

.alvi-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.alvi-message-sender {
    font-weight: 500;
    font-size: 12px;
    color: var(--alvi-text-secondary);
}

.alvi-message-time {
    font-size: 11px;
    color: var(--alvi-text-muted);
}

.alvi-message-body {
    background: var(--alvi-bg-secondary);
    padding: 12px 16px;
    border-radius: var(--alvi-radius);
    word-wrap: break-word;
    line-height: 1.4;
}

/* Estilos para markdown en mensajes */
.alvi-message-body h1,
.alvi-message-body h2,
.alvi-message-body h3 {
    margin: 8px 0 4px 0;
    font-weight: 600;
    color: inherit;
}

.alvi-message-body h1 {
    font-size: 1.2em;
}

.alvi-message-body h2 {
    font-size: 1.1em;
}

.alvi-message-body h3 {
    font-size: 1.05em;
}

.alvi-message-body strong {
    font-weight: 600;
}

.alvi-message-body em {
    font-style: italic;
}

.alvi-message-body code {
    background: rgba(0,0,0,0.1);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.alvi-message-body pre {
    background: rgba(0,0,0,0.1);
    padding: 8px 12px;
    border-radius: 6px;
    margin: 8px 0;
    overflow-x: auto;
}

.alvi-message-body pre code {
    background: none;
    padding: 0;
    font-size: 0.85em;
    line-height: 1.4;
}

.alvi-message-body ul,
.alvi-message-body ol {
    margin: 8px 0;
    padding-left: 20px;
}

.alvi-message-body li {
    margin: 2px 0;
}

.alvi-message-body a {
    color: var(--alvi-accent);
    text-decoration: underline;
}

.alvi-message-body a:hover {
    color: var(--alvi-accent-hover);
}

/* Ajustes para tema oscuro */
.alvi-theme-dark-gold .alvi-message-body code,
.alvi-theme-dark-gray .alvi-message-body code {
    background: rgba(255,255,255,0.1);
}

.alvi-theme-dark-gold .alvi-message-body pre,
.alvi-theme-dark-gray .alvi-message-body pre {
    background: rgba(255,255,255,0.1);
}

.alvi-message-user .alvi-message-body {
    background: var(--alvi-accent);
    color: white;
}

/* Corrección específica para temas oscuros - texto blanco en globos de usuario */
.alvi-theme-dark-gold .alvi-message-user .alvi-message-body,
.alvi-theme-dark-gray .alvi-message-user .alvi-message-body {
    color: white !important;
}

/* Asegurar que los enlaces y elementos internos también sean blancos en dark mode */
.alvi-theme-dark-gold .alvi-message-user .alvi-message-body *,
.alvi-theme-dark-gray .alvi-message-user .alvi-message-body * {
    color: white !important;
}

/* Excepción para códigos que pueden necesitar contraste */
.alvi-theme-dark-gold .alvi-message-user .alvi-message-body code,
.alvi-theme-dark-gray .alvi-message-user .alvi-message-body code {
    background: rgba(0, 0, 0, 0.2) !important;
    color: white !important;
}

.alvi-theme-dark-gold .alvi-message-user .alvi-message-body pre,
.alvi-theme-dark-gray .alvi-message-user .alvi-message-body pre {
    background: rgba(0, 0, 0, 0.2) !important;
    color: white !important;
}

.alvi-message-controls {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    opacity: 0;
    transition: var(--alvi-transition);
}

.alvi-message:hover .alvi-message-controls {
    opacity: 1;
}

.alvi-export-dropdown {
    position: relative;
}

.alvi-export-menu {
    position: fixed;
    background: var(--alvi-bg-primary);
    border: 1px solid var(--alvi-border);
    border-radius: var(--alvi-radius);
    box-shadow: var(--alvi-shadow-hover);
    min-width: 120px;
    z-index: 99999;
    display: none;
    padding: 4px 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.alvi-export-menu.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.alvi-export-dropdown:hover .alvi-export-menu {
    display: block;
}

.alvi-export-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--alvi-text-primary);
    font-size: 12px;
    transition: var(--alvi-transition);
}

.alvi-export-option:hover {
    background: var(--alvi-bg-secondary);
}

/* Mensaje de bienvenida */
.alvi-welcome-message .alvi-message-body {
    background: linear-gradient(135deg, var(--alvi-accent), #4a9eff);
    color: white;
    font-weight: 500;
}

/* Indicador de escritura */
.alvi-typing-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--alvi-bg-secondary);
    border-radius: var(--alvi-radius);
    margin: 16px 20px 0;
    max-width: 200px;
}

.alvi-typing-dots {
    display: flex;
    gap: 4px;
}

.alvi-typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--alvi-accent);
    border-radius: 50%;
    animation: alvi-typing 1.4s infinite ease-in-out;
}

.alvi-typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.alvi-typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

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

.alvi-typing-text {
    font-size: 12px;
    color: var(--alvi-text-secondary);
    font-style: italic;
}

/* Área de entrada */
.alvi-input-container {
    padding: 16px 20px;
    background: var(--alvi-bg-secondary);
    border-top: 1px solid var(--alvi-border);
}

.alvi-message-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alvi-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center; /* Centrar verticalmente textarea, micrófono y botón enviar */
}

.alvi-message-input {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: 12px 16px;
    border: 1px solid var(--alvi-border);
    border-radius: 20px;
    background: var(--alvi-bg-primary);
    color: var(--alvi-text-primary);
    font-family: inherit;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: var(--alvi-transition);
}

.alvi-message-input:focus {
    border-color: var(--alvi-accent);
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.alvi-message-input::placeholder {
    color: var(--alvi-text-muted);
}

.alvi-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--alvi-text-muted);
}

.alvi-char-count {
    color: var(--alvi-text-muted);
}

.alvi-powered-by {
    color: var(--alvi-text-muted);
}

/* Botones */
.alvi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--alvi-radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--alvi-transition);
    outline: none;
}

.alvi-btn:focus {
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.alvi-btn-primary {
    background: var(--alvi-accent);
    color: white;
    width: 100%;
    padding: 12px 16px;
    font-weight: 600;
}

.alvi-btn-primary:hover {
    background: var(--alvi-accent-hover);
}

.alvi-btn-send {
    background: var(--alvi-accent);
    color: white;
    border-radius: 20px;
    padding: 12px 20px;
    min-width: 80px;
}

.alvi-btn-send:hover {
    background: var(--alvi-accent-hover);
}

.alvi-btn-send:disabled {
    background: var(--alvi-border);
    color: var(--alvi-text-muted);
    cursor: not-allowed;
}

.alvi-btn-icon {
    padding: 8px;
    background: transparent;
    color: var(--alvi-text-secondary);
}

/* Estado deshabilitado (por falta de soporte de voz) */
#alvi-voice-toggle[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.alvi-btn-icon:hover {
    background: var(--alvi-bg-tertiary);
    color: var(--alvi-text-primary);
}

/* Botón de micrófono: circular y centrado con estados mejorados */
#alvi-voice-toggle {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    background: var(--alvi-bg-tertiary);
    color: var(--alvi-text-secondary);
    border: 1px solid var(--alvi-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#alvi-voice-toggle .alvi-icon { 
    width: 18px; 
    height: 18px; 
    transition: all 0.3s ease;
}

/* Estado inactivo (idle) */
#alvi-voice-toggle.alvi-idle {
    background: var(--alvi-bg-tertiary);
    color: var(--alvi-text-secondary);
    border: 1px solid var(--alvi-border);
}

#alvi-voice-toggle.alvi-idle:hover {
    background: var(--alvi-bg-secondary);
    color: var(--alvi-text-primary);
    transform: scale(1.05);
}

/* Estado escuchando (listening) */
#alvi-voice-toggle.alvi-listening {
    background: rgba(37, 99, 235, 0.15);
    color: #2563eb;
    border: 2px solid #2563eb;
    animation: alvi-listening-pulse 2s ease-in-out infinite;
}

@keyframes alvi-listening-pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.1);
        transform: scale(1.02);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
        transform: scale(1);
    }
}

/* Estado grabando (recording) */
#alvi-voice-toggle.alvi-recording {
    background: rgba(220, 50, 50, 0.15);
    color: #dc3232;
    border: 2px solid #dc3232;
    animation: alvi-recording-pulse 1s ease-in-out infinite;
}

@keyframes alvi-recording-pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(220, 50, 50, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(220, 50, 50, 0.2);
        transform: scale(1.05);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(220, 50, 50, 0);
        transform: scale(1);
    }
}

/* Estado procesando (processing) */
#alvi-voice-toggle.alvi-processing {
    background: rgba(255, 185, 0, 0.15);
    color: #ffb900;
    border: 2px solid #ffb900;
    animation: alvi-processing-spin 1.5s linear infinite;
}

@keyframes alvi-processing-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Indicador de volumen en tiempo real */
#alvi-voice-toggle::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: width 0.1s ease;
}

#alvi-voice-toggle.alvi-recording::after {
    width: 80%;
    animation: alvi-volume-indicator 0.3s ease-in-out infinite alternate;
}

@keyframes alvi-volume-indicator {
    0% { width: 20%; opacity: 0.5; }
    100% { width: 80%; opacity: 1; }
}

/* Estado deshabilitado mejorado */
#alvi-voice-toggle:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--alvi-border);
    color: var(--alvi-text-muted);
    animation: none;
    transform: none;
}

#alvi-voice-toggle:disabled:hover {
    transform: none;
    background: var(--alvi-border);
    color: var(--alvi-text-muted);
}

/* Tooltip mejorado para estados de voz */
#alvi-voice-toggle[title]:hover::before {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

#alvi-voice-toggle[title]:hover::after {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    pointer-events: none;
}

/* Animación de entrada para el botón */
#alvi-voice-toggle {
    animation: alvi-voice-button-enter 0.3s ease-out;
}

@keyframes alvi-voice-button-enter {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.alvi-btn-sm {
    padding: 4px 8px;
    font-size: 11px;
    background: var(--alvi-bg-tertiary);
    color: var(--alvi-text-secondary);
}

.alvi-btn-sm:hover {
    background: var(--alvi-border);
    color: var(--alvi-text-primary);
}

/* Iconos */
.alvi-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Reemplazo emojis por Font Awesome */
/* SVG Icons: reemplaza emojis/FA por SVG propios */
.alvi-icon-svg { display:inline-block; width: 18px; height: 18px; vertical-align: middle; }

/* Mapeo de clases a SVGs en CSS (para elementos con .alvi-icon-*) */
.alvi-icon-plus { -webkit-mask: url('../svg/plus.svg') no-repeat center / contain; mask: url('../svg/plus.svg') no-repeat center / contain; background: currentColor; }
.alvi-icon-send { -webkit-mask: url('../svg/send.svg') no-repeat center / contain; mask: url('../svg/send.svg') no-repeat center / contain; background: currentColor; }
.alvi-icon-copy { -webkit-mask: url('../svg/copy.svg') no-repeat center / contain; mask: url('../svg/copy.svg') no-repeat center / contain; background: currentColor; }
.alvi-icon-download { -webkit-mask: url('../svg/download.svg') no-repeat center / contain; mask: url('../svg/download.svg') no-repeat center / contain; background: currentColor; }
.alvi-icon-theme { -webkit-mask: url('../svg/theme.svg') no-repeat center / contain; mask: url('../svg/theme.svg') no-repeat center / contain; background: currentColor; }
.alvi-icon-dots { -webkit-mask: url('../svg/dots.svg') no-repeat center / contain; mask: url('../svg/dots.svg') no-repeat center / contain; background: currentColor; }
.alvi-icon-bot { -webkit-mask: url('../svg/bot.svg') no-repeat center / contain; mask: url('../svg/bot.svg') no-repeat center / contain; background: currentColor; }
.alvi-icon-external { -webkit-mask: url('../svg/external.svg') no-repeat center / contain; mask: url('../svg/external.svg') no-repeat center / contain; background: currentColor; }
.alvi-icon-trash { -webkit-mask: url('../svg/trash.svg') no-repeat center / contain; mask: url('../svg/trash.svg') no-repeat center / contain; background: currentColor; }
.alvi-icon-pdf { -webkit-mask: url('../svg/pdf.svg') no-repeat center / contain; mask: url('../svg/pdf.svg') no-repeat center / contain; background: currentColor; }
.alvi-icon-word { -webkit-mask: url('../svg/word.svg') no-repeat center / contain; mask: url('../svg/word.svg') no-repeat center / contain; background: currentColor; }
.alvi-icon-markdown { -webkit-mask: url('../svg/markdown.svg') no-repeat center / contain; mask: url('../svg/markdown.svg') no-repeat center / contain; background: currentColor; }
.alvi-icon-chat { -webkit-mask: url('../svg/dots.svg') no-repeat center / contain; mask: url('../svg/dots.svg') no-repeat center / contain; background: currentColor; }
.alvi-icon-close { -webkit-mask: url('../svg/close.svg') no-repeat center / contain; mask: url('../svg/close.svg') no-repeat center / contain; background: currentColor; }
.alvi-icon-menu { -webkit-mask: url('../svg/menu.svg') no-repeat center / contain; mask: url('../svg/menu.svg') no-repeat center / contain; background: currentColor; }
.alvi-icon-mic { -webkit-mask: url('../svg/mic.svg') no-repeat center / contain; mask: url('../svg/mic.svg') no-repeat center / contain; background: currentColor; }

/* Fallback para icono de menú si no existe el SVG */
.alvi-icon-menu {
    position: relative;
}
.alvi-icon-menu::before {
    content: '☰';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    line-height: 1;
}

/* Widget flotante */
.alvi-floating-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.alvi-widget-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--alvi-accent);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--alvi-shadow-hover);
    transition: var(--alvi-transition);
    position: relative;
}

.alvi-widget-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.alvi-widget-icon {
    font-size: 24px;
    transition: var(--alvi-transition);
}

.alvi-widget-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--alvi-danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alvi-widget-container {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 400px;
    height: 500px;
    background: var(--alvi-bg-primary);
    border-radius: var(--alvi-radius);
    box-shadow: var(--alvi-shadow-hover);
    animation: alvi-slide-up 0.3s ease-out;
}

@keyframes alvi-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estados de carga */
.alvi-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--alvi-text-muted);
}

.alvi-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--alvi-border);
    border-top: 2px solid var(--alvi-accent);
    border-radius: 50%;
    animation: alvi-spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes alvi-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Indicador de actividad de voz en el input */
.alvi-message-input.alvi-voice-active {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
    background: rgba(37, 99, 235, 0.02);
}

.alvi-message-input.alvi-voice-recording {
    border-color: #dc3232;
    box-shadow: 0 0 0 2px rgba(220, 50, 50, 0.2);
    background: rgba(220, 50, 50, 0.02);
}

/* Notificaciones de voz mejoradas */
.alvi-notification.alvi-voice-notification {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-left: 4px solid #1e40af;
}

.alvi-notification.alvi-voice-notification::before {
    content: '🎤';
    margin-right: 8px;
    font-size: 16px;
}

/* Estados de error */
.alvi-error {
    background: var(--alvi-danger);
    color: white;
    padding: 12px 16px;
    border-radius: var(--alvi-radius);
    margin: 16px 20px;
    font-size: 13px;
}

.alvi-chat-login-required {
    text-align: center;
    padding: 40px 20px;
    color: var(--alvi-text-muted);
    background: var(--alvi-bg-secondary);
    border-radius: var(--alvi-radius);
}

/* Responsive Design */
@media (max-width: 768px) {
    .alvi-chat-container {
        height: 100vh !important;
        border-radius: 0;
    }
    
    /* Mostrar botón de menú móvil */
    .alvi-mobile-menu-toggle {
        display: inline-flex !important;
    }
    
    .alvi-chat-sidebar {
        width: 280px;
        position: fixed;
        top: 0;
        left: -280px;
        height: 100vh;
        z-index: 10000;
        transition: left 0.3s ease;
        background: var(--alvi-bg-secondary);
        border-right: 1px solid var(--alvi-border);
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .alvi-chat-sidebar.open {
        left: 0;
    }
    
    /* Overlay para cerrar sidebar */
    .alvi-sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 9999;
        display: none;
    }
    
    .alvi-sidebar-overlay.show {
        display: block;
    }
    
    .alvi-message {
        max-width: 90%;
    }
    
    .alvi-widget-container {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        right: 20px;
        bottom: 80px;
    }
    
    /* Ajustar menús en móvil */
    .alvi-theme-menu {
        right: 10px;
        top: 60px;
    }
    
    .alvi-export-menu {
        right: 10px;
        bottom: 60px;
    }
}

@media (max-width: 480px) {
    .alvi-chat-header {
        padding: 12px 16px;
    }
    
    .alvi-messages-container {
        padding: 16px;
    }
    
    .alvi-input-container {
        padding: 12px 16px;
    }
    
    .alvi-message-input {
        font-size: 16px; /* Evitar zoom en iOS */
    }
    
    .alvi-widget-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 80px);
        right: 10px;
        bottom: 70px;
    }
}

/* Animaciones */
.alvi-fade-in {
    animation: alvi-fade-in 0.3s ease-out;
}

@keyframes alvi-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alvi-slide-in-left {
    animation: alvi-slide-in-left 0.3s ease-out;
}

@keyframes alvi-slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alvi-slide-in-right {
    animation: alvi-slide-in-right 0.3s ease-out;
}

@keyframes alvi-slide-in-right {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scrollbar personalizado */
.alvi-messages-container::-webkit-scrollbar,
.alvi-conversations-list::-webkit-scrollbar {
    width: 6px;
}

.alvi-messages-container::-webkit-scrollbar-track,
.alvi-conversations-list::-webkit-scrollbar-track {
    background: var(--alvi-bg-secondary);
}

.alvi-messages-container::-webkit-scrollbar-thumb,
.alvi-conversations-list::-webkit-scrollbar-thumb {
    background: var(--alvi-border);
    border-radius: 3px;
}

.alvi-messages-container::-webkit-scrollbar-thumb:hover,
.alvi-conversations-list::-webkit-scrollbar-thumb:hover {
    background: var(--alvi-text-muted);
}

/* Popup del menú de usuario */
.alvi-user-menu-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.alvi-user-menu-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.alvi-user-menu-popup {
    background: var(--alvi-bg-primary);
    border: 1px solid var(--alvi-border);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 90vw;
    max-width: 480px;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.alvi-user-menu-popup-overlay.show .alvi-user-menu-popup {
    transform: scale(1) translateY(0);
}

.alvi-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--alvi-border);
    background: var(--alvi-bg-secondary);
}

.alvi-popup-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--alvi-text-primary);
}

.alvi-popup-close {
    background: transparent;
    border: none;
    color: var(--alvi-text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--alvi-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.alvi-popup-close:hover {
    background: var(--alvi-bg-tertiary);
    color: var(--alvi-text-primary);
}

.alvi-popup-content {
    padding: 24px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.alvi-popup-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--alvi-bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--alvi-border-light);
}

.alvi-popup-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--alvi-border);
}

.alvi-popup-user-details {
    flex: 1;
}

.alvi-popup-user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--alvi-text-primary);
    margin-bottom: 4px;
}

.alvi-popup-user-email {
    font-size: 13px;
    color: var(--alvi-text-secondary);
    margin-bottom: 4px;
}

.alvi-popup-user-status {
    font-size: 12px;
    color: var(--alvi-success);
    font-weight: 500;
}

.alvi-popup-menu-section {
    margin-bottom: 24px;
}

.alvi-popup-menu-section:last-child {
    margin-bottom: 0;
}

.alvi-popup-section-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--alvi-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alvi-popup-menu-links,
.alvi-popup-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.alvi-popup-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid var(--alvi-border-light);
    border-radius: 8px;
    color: var(--alvi-text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--alvi-transition);
    font-family: inherit;
}

.alvi-popup-menu-item:hover {
    background: var(--alvi-bg-secondary);
    border-color: var(--alvi-border);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alvi-popup-menu-item:active {
    transform: translateY(0);
}

.alvi-popup-menu-item .alvi-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.alvi-menu-text {
    flex: 1;
    text-align: left;
}

.alvi-menu-arrow {
    color: var(--alvi-text-muted);
    font-size: 16px;
    transition: var(--alvi-transition);
}

.alvi-popup-menu-item:hover .alvi-menu-arrow {
    color: var(--alvi-accent);
    transform: translateX(2px);
}

.alvi-popup-no-links {
    text-align: center;
    color: var(--alvi-text-muted);
    font-style: italic;
    padding: 20px;
    background: var(--alvi-bg-secondary);
    border-radius: 8px;
    border: 1px dashed var(--alvi-border);
}

/* Animaciones del popup */
@keyframes alvi-popup-fade-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes alvi-popup-fade-out {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
}

.alvi-user-menu-popup.alvi-popup-entering {
    animation: alvi-popup-fade-in 0.3s ease forwards;
}

.alvi-user-menu-popup.alvi-popup-leaving {
    animation: alvi-popup-fade-out 0.3s ease forwards;
}

/* Responsive para el popup */
@media (max-width: 768px) {
    .alvi-user-menu-popup {
        width: 95vw;
        max-height: 85vh;
        margin: 20px;
    }
    
    .alvi-popup-header {
        padding: 16px 20px;
    }
    
    .alvi-popup-content {
        padding: 20px;
    }
    
    .alvi-popup-user-info {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .alvi-popup-menu-item {
        padding: 14px 16px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .alvi-user-menu-popup {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .alvi-popup-content {
        max-height: calc(100vh - 80px);
    }
}

/* Estilos para temas de página completa */
.alvi-page-theme-light,
.alvi-page-theme-light-gray,
.alvi-page-theme-dark-gold,
.alvi-page-theme-dark-gray {
    transition: background 0.5s ease, color 0.3s ease;
}

/* Mejoras para el chat en temas de página */
.alvi-page-theme-light .alvi-chat-container {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.alvi-page-theme-light-gray .alvi-chat-container {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.alvi-page-theme-dark-gold .alvi-chat-container {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(200, 169, 81, 0.3);
}

.alvi-page-theme-dark-gray .alvi-chat-container {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(75, 85, 99, 0.4);
}

/* Efectos de partículas en el canvas */
#alvi-particle-canvas {
    transition: opacity 0.5s ease;
}

/* Overlay decorativo */
#alvi-decorative-overlay {
    transition: background 0.5s ease;
}

/* Animaciones suaves para cambios de tema */
.alvi-chat-container,
.alvi-chat-header,
.alvi-chat-sidebar,
.alvi-messages-container {
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Mejoras visuales para cada tema de página */
.alvi-page-theme-light {
    --page-accent: #2563eb;
    --page-accent-light: rgba(37, 99, 235, 0.1);
}

.alvi-page-theme-light-gray {
    --page-accent: #6b7280;
    --page-accent-light: rgba(107, 114, 128, 0.1);
}

.alvi-page-theme-dark-gold {
    --page-accent: #c8a951;
    --page-accent-light: rgba(200, 169, 81, 0.15);
}

.alvi-page-theme-dark-gray {
    --page-accent: #4b5563;
    --page-accent-light: rgba(75, 85, 99, 0.15);
}

/* Efectos de hover mejorados según el tema de página */
.alvi-page-theme-light .alvi-btn:hover,
.alvi-page-theme-light-gray .alvi-btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alvi-page-theme-dark-gold .alvi-btn:hover,
.alvi-page-theme-dark-gray .alvi-btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Utilidades */
.alvi-hidden {
    display: none !important;
}

.alvi-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Prevenir scroll cuando sidebar está abierto en móvil */
body.alvi-sidebar-open {
    overflow: hidden;
}

@media (min-width: 769px) {
    body.alvi-sidebar-open {
        overflow: auto;
    }
}

/* Prevenir scroll cuando popup está abierto */
body.alvi-popup-open {
    overflow: hidden;
}

/* Notificaciones mejoradas */
.alvi-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: var(--alvi-radius);
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    box-shadow: var(--alvi-shadow-hover);
    animation: alvi-slide-in-right 0.3s ease-out;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 350px;
    word-wrap: break-word;
}

.alvi-notification-success {
    background: linear-gradient(135deg, var(--alvi-success), #3d8b40);
    border-left: 4px solid #2d7a30;
}

.alvi-notification-error {
    background: linear-gradient(135deg, var(--alvi-danger), #c53030);
    border-left: 4px solid #b91c1c;
}

.alvi-notification-info {
    background: linear-gradient(135deg, var(--alvi-accent), #1d4ed8);
    border-left: 4px solid #1e40af;
}

/* Notificación específica para voz */
.alvi-notification-voice {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-left: 4px solid #6d28d9;
}

/* Animación de salida para notificaciones */
.alvi-notification.alvi-fade-out {
    animation: alvi-fade-out 0.3s ease-in forwards;
}

@keyframes alvi-fade-out {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(100%);
    }
}