/* Mobile Bottom Navigation CSS - Enhanced Version */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bs-white);
    border-top: 1px solid var(--bs-gray-300);
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    display: none;
    z-index: 1000;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.mobile-bottom-nav .nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}

/* Normal Nav Item (Home & Profile) */
.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--bs-gray-600);
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 12px;
    min-width: 70px;
    position: relative;
}

.mobile-bottom-nav .nav-item:hover,
.mobile-bottom-nav .nav-item:focus {
    color: var(--bs-primary);
    text-decoration: none;
    transform: translateY(-2px);
}

.mobile-bottom-nav .nav-item.active {
    color: var(--bs-primary);
    background-color: var(--bs-primary-bg-subtle);
}

.mobile-bottom-nav .nav-item .nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
    position: relative;
}

.mobile-bottom-nav .nav-item .nav-text {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

/* CENTER BUTTON - Attendance (SPECIAL) */
.mobile-bottom-nav .nav-item-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    /* Gradient background */
    background: linear-gradient(135deg, var(--bs-primary) 0%, #0d6efd 100%);
    color: white !important;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    position: relative;
    top: -20px;
    box-shadow: 0 4px 16px rgba(var(--bs-primary-rgb), 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 4px solid var(--bs-white);
}

.mobile-bottom-nav .nav-item-center:hover,
.mobile-bottom-nav .nav-item-center:active {
    transform: scale(1.05) translateY(-22px);
    box-shadow: 0 6px 20px rgba(var(--bs-primary-rgb), 0.5);
    text-decoration: none;
}

.mobile-bottom-nav .nav-item-center .nav-icon-center {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.mobile-bottom-nav .nav-item-center .nav-icon-center i {
    font-size: 32px;
    color: white;
}

/* Pulse animation untuk center button */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(var(--bs-primary-rgb), 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(var(--bs-primary-rgb), 0.6),
                    0 0 0 8px rgba(var(--bs-primary-rgb), 0.1);
    }
}

.mobile-bottom-nav .nav-item-center {
    animation: pulse 2s ease-in-out infinite;
}

/* Badge untuk notifikasi (half day cuti) */
.mobile-bottom-nav .nav-item .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    z-index: 1;
}

/* Dark mode support */
[data-bs-theme="dark"] .mobile-bottom-nav {
    background: var(--bs-dark);
    border-top-color: var(--bs-gray-700);
}

[data-bs-theme="dark"] .mobile-bottom-nav .nav-item {
    color: var(--bs-gray-400);
}

[data-bs-theme="dark"] .mobile-bottom-nav .nav-item.active {
    background-color: rgba(var(--bs-primary-rgb), 0.2);
    color: var(--bs-primary);
}

[data-bs-theme="dark"] .mobile-bottom-nav .nav-item-center {
    border-color: var(--bs-dark);
}

/* Media Queries */
@media (max-width: 991.98px) {
    .mobile-bottom-nav {
        display: block;
    }

    #kt_app_sidebar_mobile_toggle {
        display: flex !important;
    }

    .app-main {
        padding-bottom: 90px;
    }

    body[data-kt-app-sidebar-minimize="on"] .app-main,
    body[data-kt-drawer-enabled] .app-main {
        padding-bottom: 90px;
    }
}

@media (max-width: 575.98px) {
    .mobile-bottom-nav .nav-item .nav-text {
        font-size: 11px;
    }
    
    .mobile-bottom-nav .nav-item {
        min-width: 60px;
        padding: 6px 12px;
    }
    
    .mobile-bottom-nav .nav-item-center {
        width: 60px;
        height: 60px;
        top: -18px;
    }
    
    .mobile-bottom-nav .nav-item-center .nav-icon-center i {
        font-size: 28px;
    }
}

/* Ripple effect untuk interaksi */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.mobile-bottom-nav .nav-item:active {
    transform: scale(0.95);
}

.mobile-bottom-nav .nav-item-center:active {
    transform: scale(0.95) translateY(-20px);
}