/* public/css/nav-modal.css */

/* Background Modal dengan Blur (Glassmorphism Overlay) */
.nav-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(15, 23, 42, 0.4); 
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUpFade {
    from { 
        transform: translateY(40px) scale(0.95); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
}

/* Kontainer Utama (Modal Box) */
.nav-modal-content {
    background: rgba(255, 255, 255, 0.95);
    margin: 6vh auto;
    padding: 30px;
    width: 90%;
    max-width: 1000px;
    border-radius: 28px;
    box-shadow: 
        0 30px 80px -20px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255,255,255,0.9) inset;
    position: relative;
    animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Header Modal */
.nav-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.nav-modal-header h2 {
    font-size: 26px;
    color: #0f172a;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.8px;
}

.nav-modal-header p {
    color: #64748b;
    font-size: 14px;
    font-weight: 400;
}

/* Body Modal (Grid) */
.nav-modal-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

/* Kolom Menu as Card */
.nav-column {
    background: #ffffff;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.nav-column:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.05);
    border-color: #e2e8f0;
}

.column-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.icon-box {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    box-shadow: 0 4px 10px -2px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* Variasi Warna Icon Box */
.blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.red { background: linear-gradient(135deg, #f43f5e, #be123c); }
.purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.green { background: linear-gradient(135deg, #10b981, #047857); }
.orange { background: linear-gradient(135deg, #f59e0b, #b45309); }

.nav-column h3 {
    font-size: 16px;
    color: #1e293b;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.2px;
}

/* Link Menu */
.nav-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-column ul li {
    margin-bottom: 2px;
}

.nav-column ul li a {
    text-decoration: none;
    color: #64748b;
    font-size: 13.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.nav-column ul li a:hover {
    color: #0f172a;
    background-color: #f8fafc;
    padding-left: 18px;
}

/* Tombol Close */
.nav-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background-color: #f1f5f9;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-close:hover {
    background-color: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

.nav-modal-close-wrapper {
    position: absolute;
    right: 25px;
    top: 25px;
}

/* Custom Scrollbar for the modal content if it overflows */
.nav-modal-content::-webkit-scrollbar {
    width: 6px;
}
.nav-modal-content::-webkit-scrollbar-track {
    background: transparent;
}
.nav-modal-content::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

/* Responsiveness for Mobile */
@media (max-width: 768px) {
    .nav-modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        padding: 40px 20px;
        overflow-y: auto;
    }

    .nav-modal-header h2 {
        font-size: 24px;
    }

    .nav-modal-body {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .nav-modal-close-wrapper {
        right: 20px;
        top: 20px;
        position: fixed;
    }
}

/* Profile Dropdown Dark Mode Support */
[data-bs-theme="dark"] #profileDropdownMenu {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] #profileDropdownMenu div,
[data-bs-theme="dark"] #profileDropdownMenu a,
[data-bs-theme="dark"] #profileDropdownMenu button,
[data-bs-theme="dark"] #profileDropdownMenu i,
[data-bs-theme="dark"] #profileDropdownMenu span,
[data-bs-theme="dark"] #profileDropdownMenu * {
    color: #f8fafc !important;
}

/* Tetap pertahankan warna merah untuk tombol Logout */
[data-bs-theme="dark"] #profileDropdownMenu .text-danger,
[data-bs-theme="dark"] #profileDropdownMenu button[style*="color: #dc3545"],
[data-bs-theme="dark"] #profileDropdownMenu button[style*="color:#dc3545"],
[data-bs-theme="dark"] #profileDropdownMenu i.bi-box-arrow-right {
    color: #ff6b6b !important;
}

[data-bs-theme="dark"] #profileDropdownMenu div {
    border-bottom-color: #334155 !important;
}

[data-bs-theme="dark"] #profileDropdownMenu a:hover,
[data-bs-theme="dark"] #profileDropdownMenu button:hover {
    background-color: #334155 !important;
    color: #ffffff !important;
}