/**
 * ============================================================
 * AKBAR KHAN TRUST
 * GLOBAL NAVIGATION CSS
 * ============================================================
 *
 * File:
 * /public_html/assets/css/components/navigation.css
 *
 * Version: 12.0.0
 * PHP: N/A
 *
 * Matches:
 * resources/views/partials/header.php
 * resources/views/partials/navbar.php
 * resources/views/partials/mobile-nav.php
 *
 * ============================================================
 */

/* ============================================================
   RESET / BASE
   ============================================================ */

.site-navbar,
.site-navbar *,
.mobile-navigation,
.mobile-navigation *,
.dashboard-nav,
.dashboard-nav * {
    box-sizing: border-box;
}

.site-navbar ul,
.site-navbar ol,
.mobile-navigation ul,
.mobile-navigation ol,
.dashboard-nav ul,
.dashboard-nav ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ============================================================
   DESKTOP PUBLIC NAVBAR
   ============================================================ */

.site-navbar {
    width: 100%;
    display: block;
    position: relative;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.navbar-container {
    width: min(100% - 32px, 1280px);
    min-height: 64px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* ============================================================
   NAVIGATION MAIN
   ============================================================ */

.navbar-main {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;

    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navbar-item {
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
}

/* ============================================================
   NAV LINKS
   ============================================================ */

.navbar-link-row {
    display: flex;
    align-items: center;
}

.navbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;
    padding: 10px 13px;

    color: #1f2937;
    background: transparent;

    text-decoration: none;
    white-space: nowrap;

    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;

    border-radius: 8px;

    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.navbar-link:hover,
.navbar-link:focus {
    color: #146c43;
    background: #f0fdf4;
    text-decoration: none;
}

.navbar-link.is-active,
.navbar-item.is-active > .navbar-link-row .navbar-link,
.navbar-item.active > .navbar-link-row .navbar-link {
    color: #146c43;
    background: #ecfdf5;
}

/* ============================================================
   NAV ICON
   ============================================================ */

.navbar-link .icon,
.navbar-link .navbar-icon,
.navbar-link i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
}

/* ============================================================
   DROPDOWN
   ============================================================ */

.navbar-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;

    z-index: 1100;

    min-width: 220px;
    padding: 8px;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;

    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.10);

    display: none;
}

.navbar-item:hover > .navbar-dropdown,
.navbar-item:focus-within > .navbar-dropdown,
.navbar-item.has-dropdown.is-open > .navbar-dropdown,
.navbar-item.is-open > .navbar-dropdown {
    display: block;
}

.navbar-dropdown__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.navbar-dropdown__item {
    display: block;
}

.navbar-dropdown__link {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 40px;
    padding: 9px 12px;

    color: #374151;
    text-decoration: none;
    white-space: nowrap;

    border-radius: 7px;
}

.navbar-dropdown__link:hover,
.navbar-dropdown__link:focus {
    color: #146c43;
    background: #f0fdf4;
    text-decoration: none;
}

/* ============================================================
   NAVBAR TOOLS
   ============================================================ */

.navbar-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;

    flex: 0 0 auto;
}

.navbar-tools a,
.navbar-tools button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    padding: 8px 12px;

    text-decoration: none;
    white-space: nowrap;

    border: 0;
    border-radius: 7px;

    background: transparent;
    color: #374151;

    font: inherit;
    cursor: pointer;
}

.navbar-tools a:hover,
.navbar-tools button:hover {
    background: #f3f4f6;
    color: #146c43;
}

/* ============================================================
   ONLINE APPLICATION
   ============================================================ */

.navbar-application,
.navbar-apply {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 9px 14px;

    color: #ffffff !important;
    background: #146c43 !important;

    border-radius: 8px;
    font-weight: 700;
}

.navbar-application:hover,
.navbar-apply:hover {
    background: #0f5132 !important;
}

/* ============================================================
   DASHBOARD SWITCHER
   ============================================================ */

.dashboard-switcher,
.navbar-dashboard-switcher {
    width: 100%;
    display: block;

    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.dashboard-switcher__container,
.navbar-dashboard-switcher__container {
    width: min(100% - 32px, 1280px);
    margin: 0 auto;

    display: flex;
    align-items: center;
    gap: 6px;

    overflow-x: auto;
    scrollbar-width: thin;

    padding: 8px 0;
}

.dashboard-switcher a,
.navbar-dashboard-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    min-height: 38px;
    padding: 7px 12px;

    color: #374151;
    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 7px;

    text-decoration: none;
    white-space: nowrap;

    font-size: 14px;
    font-weight: 600;
}

.dashboard-switcher a:hover,
.navbar-dashboard-switcher a:hover {
    color: #146c43;
    border-color: #86efac;
    background: #f0fdf4;
}

.dashboard-switcher a.is-active,
.navbar-dashboard-switcher a.is-active,
.dashboard-switcher a.active,
.navbar-dashboard-switcher a.active {
    color: #ffffff;
    background: #146c43;
    border-color: #146c43;
}

/* ============================================================
   DASHBOARD NAVIGATION
   ============================================================ */

.dashboard-nav {
    width: 100%;
    display: block;
}

.dashboard-nav__list {
    display: flex;
    flex-direction: column;

    margin: 0;
    padding: 0;

    list-style: none;
}

.dashboard-nav__item {
    display: block;
    width: 100%;
}

.dashboard-nav__link {
    display: flex;
    align-items: center;
    width: 100%;

    min-height: 44px;
    padding: 10px 14px;

    color: #374151;
    text-decoration: none;

    border-radius: 8px;
}

.dashboard-nav__link:hover {
    color: #146c43;
    background: #f0fdf4;
}

.dashboard-nav__item.is-active > .dashboard-nav__link,
.dashboard-nav__link.is-active {
    color: #146c43;
    background: #ecfdf5;
    font-weight: 700;
}

/* ============================================================
   MOBILE TOGGLE
   ============================================================ */

.navbar-mobile-toggle,
.header__mobile-toggle {
    display: none;

    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    padding: 0;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    background: #ffffff;
    color: #374151;

    cursor: pointer;
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 991.98px) {

    .navbar-container {
        width: min(100% - 24px, 1280px);
    }

    .navbar-main {
        display: none;
    }

    .navbar-tools {
        margin-left: auto;
    }

    .navbar-mobile-toggle,
    .header__mobile-toggle {
        display: inline-flex;
    }

    .dashboard-switcher__container,
    .navbar-dashboard-switcher__container {
        width: min(100% - 24px, 1280px);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================================
   SMALL MOBILE
   ============================================================ */

@media (max-width: 575.98px) {

    .navbar-container {
        width: calc(100% - 20px);
        min-height: 58px;
    }

    .navbar-tools {
        gap: 3px;
    }

    .navbar-tools a,
    .navbar-tools button {
        min-width: 38px;
        padding: 7px 9px;
    }

    .dashboard-switcher__container,
    .navbar-dashboard-switcher__container {
        width: calc(100% - 20px);
    }

    .dashboard-switcher a,
    .navbar-dashboard-switcher a {
        min-height: 36px;
        padding: 7px 10px;
        font-size: 13px;
    }
}

/* ============================================================
   MOBILE NAVIGATION DRAWER
   ============================================================ */

.mobile-navigation {
    display: none;
}

.mobile-navigation.is-open,
.mobile-navigation[aria-hidden="false"] {
    display: block;
}

.mobile-navigation__backdrop {
    position: fixed;
    inset: 0;
    z-index: 1998;

    background: rgba(0, 0, 0, 0.45);
}

.mobile-navigation__drawer {
    position: fixed;
    top: 0;
    right: 0;

    z-index: 1999;

    width: min(88vw, 360px);
    height: 100vh;

    overflow-y: auto;

    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
}

.mobile-navigation__list {
    display: flex;
    flex-direction: column;

    margin: 0;
    padding: 12px;

    list-style: none;
}

.mobile-navigation__item {
    display: block;
    width: 100%;
}

.mobile-navigation__link {
    display: flex;
    align-items: center;
    width: 100%;

    min-height: 46px;
    padding: 10px 12px;

    color: #374151;
    text-decoration: none;

    border-radius: 8px;
}

.mobile-navigation__link:hover,
.mobile-navigation__link.is-active {
    color: #146c43;
    background: #ecfdf5;
}

/* ============================================================
   IMPORTANT: NEVER ALLOW RAW NAV LINKS TO APPEAR AS PLAIN TEXT
   ============================================================ */

.site-navbar nav ul,
.site-navbar nav li {
    list-style: none;
}

.site-navbar nav a {
    text-decoration: none;
}

.site-navbar nav > ul {
    display: flex;
    align-items: center;
}

/* ============================================================
   PRINT
   ============================================================ */

@media print {

    .site-navbar,
    .dashboard-switcher,
    .navbar-tools,
    .navbar-mobile-toggle,
    .header__mobile-toggle,
    .mobile-navigation {
        display: none !important;
    }
}