/* =====================================================================
   mobile_nav.css — mobil aşağı naviqasiya + "Daha çox" paneli
   Tam müstəqildir: index_style.css-dən heç nə tələb etmir.
   Yalnız Bootstrap Icons lazımdır (ikonlar üçün).
===================================================================== */

/* ---------- Aşağı naviqasiya ---------- */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    background-color: var(--white, #ffffff);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.mobile-nav .mobile-nav-item {
    /* Hər düymə eyni genişlikdə (5-də 1) — yerləri yazı/ikon genişliyindən
       asılı deyil, ona görə səhifə yüklənərkən sürüşmür. */
    flex: 1 1 0;
    min-width: 0;
    /* Səhifənin öz "nav a { margin-left }" kimi ümumi qaydaları təsir etməsin */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gray, #666666);
    font-size: 0.8rem;
}

/* Hər ikon qutusu eyni hündürlükdədir (32px = yaşıl "+" dairəsi ilə eyni),
   yazı ölçüsü və sətir hündürlüyü də sabitdir. Beləliklə bütün 5 düymənin
   alt yazısı hər səhifədə eyni səviyyədə qalır. */
.mobile-nav .mobile-nav-item > i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    line-height: 1;
    margin: 0 0 3px;
}

.mobile-nav .mobile-nav-item > small {
    display: block;
    font-size: 0.7rem;
    line-height: 1.2;
    margin: 0;
}

.mobile-nav .mobile-nav-item.active {
    color: var(--primary, #0d6efd);
}

/* Hover yalnız siçanı olan cihazlarda — telefonda toxunuşdan sonra mavi qalmasın */
@media (hover: hover) {
    .mobile-nav .mobile-nav-item:hover {
        color: var(--primary, #0d6efd);
    }
}

/* Ortadakı yaşıl "+" dairəsi */
.mobile-nav-item .add-btn-circle {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    background-color: #22c55e;
    color: #ffffff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 3px;
}

.mobile-nav-item .add-btn-circle i {
    display: block;
    font-size: 18px;
    line-height: 1;
    margin: 0;
}

.mobile-nav-item .add-btn-circle i::before {
    display: block;
    line-height: 1;
    vertical-align: 0;
}

/* "Daha çox" düyməsi <button> olduğu üçün brauzer stilini sıfırlayırıq */
.mobile-nav-more {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Aşağı naviqasiya məzmunun son hissəsini örtməsin */
@media (max-width: 767px) {
    body {
        padding-bottom: 70px;
    }

    /* Yuxarıdakı hamburger (nav.php / index.php) mobildə gizlənir —
       eyni linklər aşağıdakı "Menyu" panelindədir.
       !important: nav_style.css-in display qaydasını üstələmək üçün */
    header #projectMenu,
    #projectMenu {
        display: none !important;
    }
}

/* Desktopda naviqasiya və panel heç vaxt görünməsin */
@media (min-width: 768px) {
    .mobile-nav,
    .more-modal,
    .more-overlay {
        display: none !important;
    }
}

/* Kabinet/Profil kimi səhifələrdə yan panel (sidebar) 992px-ə qədər gizlənir,
   ona görə naviqasiya da 992px-ə qədər görünməlidir.
   İstifadə: <body class="mobile-nav-wide"> */
@media (min-width: 768px) and (max-width: 992px) {
    body.mobile-nav-wide .mobile-nav {
        display: flex !important;
    }
    body.mobile-nav-wide .more-modal {
        display: flex !important;
    }
    body.mobile-nav-wide .more-overlay {
        display: block !important;
    }
    body.mobile-nav-wide {
        padding-bottom: 70px;
    }
}

/* ---------- "Daha çox" paneli ---------- */
.more-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.more-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.more-modal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #ffffff;
    border-radius: 0;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    padding-top: env(safe-area-inset-top);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.4s;
}

.more-modal.active {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s;
}

body:has(.more-modal.active) {
    overflow: hidden;
}

/* Başlıq */
.more-modal-header {
    position: relative;
    flex-shrink: 0;
    padding: 16px 20px;
    border-bottom: 1px solid #eef0f3;
}

.more-handle {
    display: none;
    width: 40px;
    height: 4px;
    background: #d0d0d0;
    border-radius: 2px;
    margin: 0 auto 12px;
}

.more-title {
    margin: 0;
    text-align: left;
    font-size: 20px;
    font-weight: 800;
    color: #1b2430;
    line-height: 1.2;
}

.more-close-btn {
    position: absolute;
    top: 12px;
    right: 20px;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    color: #666666;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s;
}

.more-close-btn:active {
    background: #e0e0e0;
}

/* Məzmun */
.more-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
}

.more-group {
    margin-bottom: 20px;
}

.more-group-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9aa3b1;
    margin-bottom: 8px;
}

/* Əsas bölmələr — 2x2 kartlar */
.more-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.more-main-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: #eef4ff;
    border: 1px solid #c7dbff;
    border-radius: 12px;
    color: #1b2430;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
}

.more-main-item i {
    color: #0d6efd;
    font-size: 18px;
}

/* Digər linklər — siyahı */
.more-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.more-list li {
    border-bottom: 1px solid #f0f1f3;
}

.more-list li:last-child {
    border-bottom: none;
}

.more-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 2px;
    font-size: 15px;
    color: #33404f;
    text-decoration: none;
}

.more-list a i {
    color: #c0c6d0;
    font-size: 13px;
}

/* Çıxış — ayrıca və qırmızı */
.more-list a.more-logout {
    justify-content: flex-start;
    gap: 10px;
    color: #dc3545;
    font-weight: 600;
}

.more-list a.more-logout i {
    color: #dc3545;
    font-size: 16px;
}
/* Siyahı linklərində ikon (desktop menyu ilə eyni) */
.more-list a .more-link-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.more-list a .more-link-main i {
    width: 20px;
    font-size: 17px;
    color: #9aa3b1;
    text-align: center;
}

.more-list a:active .more-link-main i {
    color: #0d6efd;
}