/* =============================================================================
   NAVIGATION — Dragons Academy
   Mobile / Tablet: fixed bottom bar
   Desktop (1025px+): fixed left sidebar (220px)
   ============================================================================= */

/* ── Brand header (sidebar only) ─────────────────────────────────────────── */
.body.has-bottom-nav {
    background-color: #111111 !important;
}
.dragons-bottom-nav__brand {
    display: none; /* hidden on mobile */
    text-decoration: none;
    color: var(--dragonsprojectworldwide-text, #ffffff);
}

/* ── Shared nav shell ─────────────────────────────────────────────────────── */

.dragons-bottom-nav {
    position: fixed;
    z-index: 9999;
    background: rgba(13, 13, 13, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* ════════════════════════════════════════════════════════════════════════════
   MOBILE / TABLET  —  bottom bar
   ════════════════════════════════════════════════════════════════════════════ */

.dragons-bottom-nav {
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(201, 168, 76, 0.18);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: flex-start;
}

.dragons-bottom-nav__list {
    display: flex;
    width: 100%;
    height: 64px;
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: stretch;
}

.dragons-bottom-nav__item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Admin item hidden by default; revealed by body class */
.dragons-bottom-nav__item--admin { display: none; }
.is-admin-user .dragons-bottom-nav__item--admin { display: flex; }

/* Link */
.dragons-bottom-nav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
    height: 100%;
    padding: 10px 4px 8px;
    color: rgba(255, 255, 255, 0.38);
    text-decoration: none;
    font-family: 'Linear Grotesk', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: color 0.22s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    position: relative;
}

/* SVG icon */
.dragons-bottom-nav__link svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Active / hover */
.dragons-bottom-nav__link:hover,
.dragons-bottom-nav__link.active {
    color: var(--dragonsprojectworldwide-brand, #C9A84C);
}

.dragons-bottom-nav__link.active svg,
.dragons-bottom-nav__link:hover svg {
    transform: translateY(-3px) scale(1.14);
}

/* Active indicator dot */
.dragons-bottom-nav__link.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--dragonsprojectworldwide-brand, #C9A84C);
    box-shadow: 0 0 6px rgba(201, 168, 76, 0.7);
}

/* Keyboard focus */
.dragons-bottom-nav__link:focus-visible {
    outline: 2px solid var(--dragonsprojectworldwide-brand, #C9A84C);
    outline-offset: -3px;
    border-radius: 8px;
}

/* Page padding */
body.has-bottom-nav {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
}

/* ════════════════════════════════════════════════════════════════════════════
   DESKTOP  —  left sidebar (1025px+)
   ════════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1025px) {

    .dragons-bottom-nav {
        /* Override bottom-bar geometry */
        bottom: unset;
        right: unset;
        top: 0;
        left: 0;
        width: 220px;
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        align-items: stretch;
        border-top: none;
        border-right: 1px solid rgba(255, 255, 255, 0.06);
        padding-bottom: 0;
        padding-top: 0;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;
        background: rgba(10, 10, 10, 0.96);
    }

    .dragons-bottom-nav::-webkit-scrollbar { display: none; }
    .da-btn svg {
        width: 21px;
    }
    /* Brand / logo area */
    .dragons-bottom-nav__brand {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 11px;
        padding: 28px 20px 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        text-decoration: none;
        color: var(--dragonsprojectworldwide-text, #ffffff);
        transition: opacity 0.2s ease;
        flex-shrink: 0;
    }

    .dragons-bottom-nav__brand:hover { opacity: 0.8; }

    .dragons-bottom-nav__brand-logo {
        display: block;
        width: 120px;
        height: auto;
        filter: drop-shadow(0 2px 10px rgba(201, 168, 76, 0.3));
    }

    /* Nav list — vertical */
    .dragons-bottom-nav__list {
        flex-direction: column;
        width: 100%;
        height: auto;
        padding: 12px 12px;
        gap: 2px;
        align-items: stretch;
        flex: 1;
    }

    .dragons-bottom-nav__item {
        flex: none;
        width: 100%;
        justify-content: flex-start;
    }

    /* Admin item always visible on desktop (body class guard stays) */
    .dragons-bottom-nav__item--admin { display: flex; }

    /* Link row */
    .dragons-bottom-nav__link {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        width: 100%;
        height: auto;
        padding: 11px 14px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.45);
        transition: background 0.2s ease, color 0.2s ease;
    }

    .dragons-bottom-nav__link svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

    /* Active & hover on desktop */
    .dragons-bottom-nav__link:hover {
        background: rgba(255, 255, 255, 0.06);
        color: rgba(255, 255, 255, 0.85);
        transform: none;
    }

    .dragons-bottom-nav__link:hover svg { transform: none; }

    .dragons-bottom-nav__link.active {
        background: rgba(201, 168, 76, 0.14);
        color: var(--dragonsprojectworldwide-brand, #C9A84C);
    }

    .dragons-bottom-nav__link.active svg { transform: none; }

    /* Active: left bar indicator */
    .dragons-bottom-nav__link.active::after {
        content: '';
        position: absolute;
        top: 20%;
        bottom: 20%;
        left: 0;
        width: 3px;
        height: auto;
        border-radius: 0 3px 3px 0;
        background: var(--dragonsprojectworldwide-brand, #C9A84C);
        box-shadow: 0 0 10px rgba(201, 168, 76, 0.6);
        transform: none;
        left: -12px; /* sits just inside the padding */
    }

    /* Labels always visible */
    .dragons-bottom-nav__label { display: inline; }

    /* Body shift */
    body.has-bottom-nav {
        background-color: #111111 !important;
        padding-bottom: 0 !important;
        padding-left: 220px !important;
    }
}
