/* Menu Mobile Flutuante */
.floating-mobile-menu {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 100%;
    max-width: 400px;
    padding: 0 20px;
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: none; /* Esconde por padrão */
}

/* Mostra apenas em dispositivos móveis */
@media (max-width: 768px) {
    .floating-mobile-menu {
        display: block;
        bottom: 25px;
    }
}

.floating-menu-container {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 8px 20px 20px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: visible;
}

.floating-menu-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 50px;
    pointer-events: none;
}

.floating-menu-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: space-around;
    align-items: center;
    gap: 0;
}

.floating-menu-item {
    flex: 1;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-menu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: transparent;
    border: 2px solid transparent;
    margin: 0 auto;
}

.floating-menu-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.floating-menu-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.floating-menu-link:hover::before {
    opacity: 1;
}

/* Item ativo do menu */
.floating-menu-link.active {
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.floating-menu-link.active::before {
    opacity: 1;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
}

.floating-menu-link:active {
    transform: translateY(0);
}

.floating-menu-link i,
.floating-menu-link svg {
    font-size: 24px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Labels do menu mobile */
.menu-label {
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.floating-menu-link:hover .menu-label,
.floating-menu-link.active .menu-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* Notificação de mensagens */
.noti_msg {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid rgba(30, 30, 30, 0.95);
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
}



/* Animações */
@keyframes float {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 8px 20px rgba(var(--primary-color-rgb, 0, 123, 255), 0.4), 0 0 0 4px rgba(var(--primary-color-rgb, 0, 123, 255), 0.1);
    }
    50% {
        box-shadow: 0 8px 20px rgba(var(--primary-color-rgb, 0, 123, 255), 0.6), 0 0 0 8px rgba(var(--primary-color-rgb, 0, 123, 255), 0.2);
    }
    100% {
        box-shadow: 0 8px 20px rgba(var(--primary-color-rgb, 0, 123, 255), 0.4), 0 0 0 4px rgba(var(--primary-color-rgb, 0, 123, 255), 0.1);
    }
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
        visibility: visible;
    }
    to {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
        visibility: hidden;
    }
}

.floating-mobile-menu {
    animation: float 3s ease-in-out infinite;
}

.floating-mobile-menu.menu-loaded {
    animation: slideUp 0.5s ease-out;
}

.floating-mobile-menu.menu-hidden {
    animation: slideDown 0.3s ease-out forwards;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(100px);
    visibility: hidden;
}

/* Garante que o menu fique completamente escondido após a animação */
.floating-mobile-menu.menu-hidden * {
    pointer-events: none;
}

/* Força o escondimento após a animação */
.floating-mobile-menu.menu-hidden {
    animation: slideDown 0.3s ease-out forwards;
}

/* Estado final após animação */
@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
        visibility: visible;
    }
    to {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
        visibility: hidden;
    }
}

/* Responsividade */
@media (max-width: 480px) {
    .floating-mobile-menu {
        bottom: 20px;
        padding: 0 15px;
    }
    
    .floating-menu-container {
        padding: 6px 15px 18px 15px;
    }
    
    .floating-menu-link {
        width: 50px;
        height: 50px;
    }
    
    .floating-menu-link i,
    .floating-menu-link svg {
        font-size: 22px;
        width: 22px;
        height: 22px;
    }
    
    .menu-label {
        font-size: 11px;
        bottom: -16px;
    }
}

@media (max-width: 360px) {
    .floating-mobile-menu {
        bottom: 15px;
        padding: 0 10px;
    }
    
    .floating-menu-container {
        padding: 5px 12px 15px 12px;
    }
    
    .floating-menu-link {
        width: 45px;
        height: 45px;
    }
    
    .floating-menu-link i,
    .floating-menu-link svg {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
    
    .menu-label {
        font-size: 10px;
        bottom: -14px;
    }
}

/* Modo escuro/claro */
[data-bs-theme="light"] .floating-menu-container {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .floating-menu-link {
    color: rgba(0, 0, 0, 0.7);
}

[data-bs-theme="light"] .floating-menu-link:hover {
    color: #000000;
    background: rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .floating-menu-link.active {
    background: rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.4);
}

[data-bs-theme="light"] .floating-menu-link.active::before {
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2) 0%, transparent 70%);
}

[data-bs-theme="light"] .menu-label {
    color: rgba(0, 0, 0, 0.8);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

[data-bs-theme="light"] .noti_msg {
    border-color: rgba(255, 255, 255, 0.95);
}

/* Suporte para navegadores antigos */
@supports not (backdrop-filter: blur(20px)) {
    .floating-menu-container {
        background: rgba(30, 30, 30, 0.98);
    }
}

/* Transições suaves */
.floating-menu-link,
.floating-menu-container {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


/* Efeito de hover para todos os itens */
.floating-menu-item:hover .floating-menu-link {
    transform: translateY(-2px);
}
