/* /assets/css/mascota.css */

:root {
    /* Colores modo claro (Default) */
    --burbuja-bg: #ffffff;
    --burbuja-txt: #1f2937;
    --burbuja-borde: #ef4444; /* Rojo iCheck */
    --mascota-sombra: rgba(0,0,0,0.15);
}

/* Colores para Modo Oscuro */
body.dark-mode, body.dark {
    --burbuja-bg: #1e293b; 
    --burbuja-txt: #f8fafc; 
    --burbuja-borde: #f87171; 
    --mascota-sombra: rgba(255,255,255,0.1);
}

/* 1. FILTRO DE VISIBILIDAD PARA LOGOS Y MASCOTA (MODO OSCURO) */
body.dark-mode .img-mascota, 
body.dark-mode .logo-navbar,
body.dark-mode .logo-cliente-dark,
body.dark-mode .nav-brand img,
body.dark .img-mascota, 
body.dark .logo-navbar,
body.dark .logo-cliente-dark,
body.dark .nav-brand img,
.main-navbar .nav-brand img, 
.main-navbar .logo-navbar {
    filter: drop-shadow(0 0 1px #fff) 
            drop-shadow(0 0 1px #fff) 
            drop-shadow(0 0 8px rgba(255,255,255,0.4)) !important;
    transition: filter 0.3s ease;
}

/* 2. CONTENEDOR PRINCIPAL: Posición y viaje entre lados */
.mascota-whatsapp-fix {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    align-items: flex-end;
    z-index: 9999;
    cursor: pointer;
    text-decoration: none;
    transition: right 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55), 
                left 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* 3. CONTENEDOR DE IMAGEN: Giro y brinco */
.contenedor-mascota {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
}

/* EFECTO DE BRINCO AL PASAR EL MOUSE (REEMPLAZO DEL GIRO) */
.mascota-whatsapp-fix:hover .contenedor-mascota {
    /* Animación de brinco: Salto alto + estiramiento vertical */
    animation: brincoHoverLimpio 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
}

/* 4. LA IMAGEN: Contorno sticker y flotación */
.img-mascota {
    width: 150px; 
    height: auto;
    /* Contorno sticker permanente */
    filter: drop-shadow(1px 1px 0px #fff) 
           drop-shadow(-1px -1px 0px #fff) 
           drop-shadow(1px -1px 0px #fff) 
           drop-shadow(-1px 1px 0px #fff)
           drop-shadow(0 0 5px rgba(255,255,255,0.3));
    
    animation: flotarAnim 4s infinite ease-in-out;
    transition: filter 0.3s ease;
}

.mascota-whatsapp-fix:hover .img-mascota {
    filter: drop-shadow(1px 1px 0px #fff) 
           drop-shadow(-1px -1px 0px #fff) 
           drop-shadow(1px -1px 0px #fff) 
           drop-shadow(-1px 1px 0px #fff)
           drop-shadow(0 0 20px rgba(255,255,255,0.9)) !important;

           /* Forzamos que la imagen no se deforme en el hover */
    transform: none !important;
}

/* 5. LA BURBUJA: Estilos base unificados */
.burbuja-mensaje {
    background: var(--burbuja-bg);
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 5px 20px var(--mascota-sombra);
    margin-right: 12px;
    margin-bottom: 35px;
    min-width: 180px;
    max-width: 220px;
    position: relative;
    border: 2px solid var(--burbuja-borde);
    transform: none !important;
    transition: all 0.3s ease;
}

.burbuja-mensaje::after {
    content: "";
    position: absolute;
    right: -10px;
    bottom: 15px;
    border-width: 10px 0 10px 10px;
    border-style: solid;
    border-color: transparent transparent transparent var(--burbuja-borde);
}

#texto-dinamico {
    color: var(--burbuja-txt);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    display: block;
}

/* 6. LÓGICA IZQUIERDA */
.mascota-izquierda {
    right: auto !important;
    left: 25px !important;
    flex-direction: row-reverse;
}

.mascota-izquierda .burbuja-mensaje {
    margin-right: 0;
    margin-left: 12px;
}

.mascota-izquierda .burbuja-mensaje::after {
    right: auto;
    left: -10px;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--burbuja-borde) transparent transparent;
}


/* Definición del brinco específico para el Mouse Over */
/* Definición del brinco específico para el Mouse Over - Solo Movimiento */
@keyframes brincoHoverLimpio {
    0% { transform: translateY(0); }
    30% { transform: translateY(-40px); } /* Salto alto y limpio */
    50% { transform: translateY(-5px); }    /* Caída rápida */
    75% { transform: translateY(-15px); }   /* Pequeño rebote final */
    100% { transform: translateY(-10px); }  /* Reposa un poquito arriba para que no se pegue */
}

/* 7. ANIMACIONES */
@keyframes flotarAnim {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}