/* =========================================
   1. RESET Y CONFIGURACIÓN BASE
   ========================================= */
body {
    -webkit-tap-highlight-color: transparent;
    background-color: #F8FAFC; /* Slate 50 */
    font-family: 'Inter', sans-serif;
}

/* Scroll suave para toda la página */
html {
    scroll-behavior: smooth;
}

/* =========================================
   2. UTILIDADES
   ========================================= */

/* Efecto Vidrio (Glassmorphism) */
.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

/* Espacio seguro para móviles (iPhone X+) */
.pb-safe {
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* Ocultar scrollbar pero permitir scroll */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* =========================================
   3. COMPONENTES DE NAVEGACIÓN
   ========================================= */

/* Badge rojo de notificaciones */
.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #EF4444; /* Red 500 */
    color: white;
    border-radius: 99px;
    min-width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.3);
}

/* Ítems de navegación activos (Barra inferior móvil) */
.nav-item.active i,
.nav-item.active span {
    color: #4CAF50; /* Brand Color */
    font-weight: 600;
}

/* =========================================
   4. ESTILOS DEL CHAT (Burbujas)
   ========================================= */

/* Contenedor del chat scrollbar personalizado */
.chat-container::-webkit-scrollbar {
    width: 6px;
}
.chat-container::-webkit-scrollbar-thumb {
    background-color: #cbd5e1; /* Slate 300 */
    border-radius: 3px;
}

/* Burbuja general */
.msg-bubble {
    max-width: 75%;
    position: relative;
    word-wrap: break-word;
    line-height: 1.4;
}

/* Mis mensajes (Enviados) */
.msg-me {
    border-radius: 18px 18px 4px 18px;
    background: #4CAF50; /* Brand Color */
    color: white;
    margin-left: auto; /* Empujar a la derecha */
}

/* Mensajes recibidos (Otros) */
.msg-other {
    border-radius: 18px 18px 18px 4px;
    background: white;
    color: #1e293b; /* Slate 800 */
    border: 1px solid #e2e8f0; /* Slate 200 */
}

/* =========================================
   5. ANIMACIONES
   ========================================= */

/* Deslizar hacia arriba (Entrada de mensajes/Toasts) */
@keyframes slide-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.animate-slide-up {
    animation: slide-up 0.3s ease-out forwards;
}

/* Efecto Pop (Para los badges de notificación) */
@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.animate-pop {
    animation: pop 0.3s ease-out;
}

/* Fade In general */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
.animate-fade-in {
    animation: fade-in 0.5s ease-out forwards;
}