/* Footer Fixed Menu - Hiển thị trên cả PC và Mobile */

.footer-fixed-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-fixed-menu.show {
    opacity: 1;
    transform: translateY(0);
}

/* Fade in animation */
.footer-fixed-menu.show.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Fade out animation */
.footer-fixed-menu.show.fade-out {
    opacity: 0;
    transform: translateY(100%);
}

.footer-fixed-menu .menu-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
    min-height: 60px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.footer-fixed-menu .menu-item:hover,
.footer-fixed-menu .menu-item:active {
    background: rgba(0, 0, 0, 0.05);
    color: #007bff;
}

.footer-fixed-menu .menu-item i {
    font-size: 20px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.footer-fixed-menu .menu-item:hover i,
.footer-fixed-menu .menu-item:active i {
    transform: scale(1.1);
}

.footer-fixed-menu .menu-item span {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* Submenu cho Liên hệ */
.footer-fixed-submenu {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 12px;
    display: none;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
    z-index: 10000;
    border: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-fixed-submenu.show {
    display: flex;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.footer-fixed-submenu .submenu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.footer-fixed-submenu .submenu-item:hover,
.footer-fixed-submenu .submenu-item:active {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.footer-fixed-submenu .submenu-item img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.footer-fixed-submenu .submenu-item span {
    font-size: 14px;
    font-weight: 500;
}

/* Overlay để đóng submenu khi click bên ngoài */
.footer-fixed-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-fixed-overlay.show {
    display: block;
    opacity: 1;
}

/* Desktop Design (min-width: 601px) */
@media screen and (min-width: 601px) {
    .footer-fixed-menu {
        justify-content: center;
        padding: 12px 0;
        max-width: 800px;
        left: 50%;
        transform: translateX(-50%) translateY(100%);
        border-radius: 16px 16px 0 0;
        border-left: 1px solid rgba(0, 0, 0, 0.1);
        border-right: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.98) 100%);
    }
    
    .footer-fixed-menu.show {
        transform: translateX(-50%) translateY(0);
    }
    
    .footer-fixed-menu.show.fade-in {
        transform: translateX(-50%) translateY(0);
    }
    
    .footer-fixed-menu.show.fade-out {
        transform: translateX(-50%) translateY(100%);
    }
    
    .footer-fixed-menu .menu-item {
        flex: 0 1 auto;
        min-width: 100px;
        max-width: 150px;
        padding: 12px 16px;
        min-height: 65px;
        border-radius: 8px;
        margin: 0 4px;
        position: relative;
    }
    
    .footer-fixed-menu .menu-item:hover {
        background: rgba(0, 123, 255, 0.1);
        color: #007bff;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
    }
    
    .footer-fixed-menu .menu-item i {
        font-size: 22px;
        margin-bottom: 6px;
    }
    
    .footer-fixed-menu .menu-item span {
        font-size: 12px;
        font-weight: 600;
    }
    
    .footer-fixed-submenu {
        bottom: 85px;
    }
    
    /* Đảm bảo content không bị che bởi menu trên desktop */
    body {
        padding-bottom: 80px;
    }
}

/* Mobile Design (max-width: 600px) */
@media screen and (max-width: 600px) {
    .footer-fixed-menu {
        padding: 8px 0;
    }
    
    .footer-fixed-menu .menu-item {
        padding: 8px 4px;
        min-height: 60px;
    }
    
    .footer-fixed-menu .menu-item i {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .footer-fixed-menu .menu-item span {
        font-size: 11px;
    }
    
    .footer-fixed-submenu {
        bottom: 70px;
    }
    
    /* Đảm bảo content không bị che bởi menu trên mobile */
    body {
        padding-bottom: 70px;
    }
}

/* Dark mode support */
body.dark-mode .footer-fixed-menu {
    background: rgba(30, 30, 30, 0.98);
    border-top-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .footer-fixed-menu .menu-item {
    color: #fff;
}

body.dark-mode .footer-fixed-menu .menu-item:hover,
body.dark-mode .footer-fixed-menu .menu-item:active {
    background: rgba(255, 255, 255, 0.1);
    color: #4dabf7;
}

body.dark-mode .footer-fixed-submenu {
    background: rgba(30, 30, 30, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body.dark-mode .footer-fixed-submenu .submenu-item {
    color: #fff;
}

body.dark-mode .footer-fixed-submenu .submenu-item:hover,
body.dark-mode .footer-fixed-submenu .submenu-item:active {
    background: rgba(77, 171, 247, 0.2);
    color: #4dabf7;
}

/* Desktop dark mode adjustments */
@media screen and (min-width: 601px) {
    body.dark-mode .footer-fixed-menu {
        background: linear-gradient(135deg, rgba(30, 30, 30, 0.98) 0%, rgba(40, 40, 40, 0.98) 100%);
    }
    
    body.dark-mode .footer-fixed-menu .menu-item:hover {
        background: rgba(77, 171, 247, 0.15);
        box-shadow: 0 4px 8px rgba(77, 171, 247, 0.3);
    }
}

