@charset "UTF-8";

/**
 * Bottom tab bar — native mobile app style (iOS / Material)
 * Theme colors via --primary / --card-bg / --text-* from backend
 */

/* ============================================================
   CONTAINER
   ============================================================ */

.bottom-nav {
    --bnav-height: 56px;
    --bnav-inactive: var(--text-secondary, #8e8e93);
    --bnav-active: var(--primary, #0d6efd);
    --bnav-surface: color-mix(in srgb, var(--card-bg, #ffffff) 88%, transparent);
    --bnav-border: color-mix(in srgb, var(--border-color, #ced4da) 55%, transparent);

    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: stretch;
    justify-content: center;
    margin: 0 !important;
    padding: 0 0 env(safe-area-inset-bottom, 0) !important;
    border: none !important;
    border-radius: 0 !important;
    border-top: 1px solid var(--bnav-border) !important;
    background: var(--bnav-surface) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.06) !important;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.28s ease,
        visibility 0.28s ease;
    overflow: visible !important;
}

@supports not (background: color-mix(in srgb, white 50%, transparent)) {
    .bottom-nav {
        --bnav-surface: rgba(255, 255, 255, 0.92);
        --bnav-border: rgba(0, 0, 0, 0.08);
    }
}

.bottom-nav.visible,
.bottom-nav.d-lg-none.visible {
    bottom: 0 !important;
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
}

.bottom-nav:not(.visible) {
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@media (min-width: 992px) {
    .bottom-nav.d-lg-none,
    .bottom-nav.d-lg-none.visible {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateY(100%) !important;
    }
}

@media (max-width: 991.98px) {
    .bottom-nav.d-lg-none {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: translateY(0) !important;
    }
}

/* ============================================================
   LIST / ITEMS
   ============================================================ */

.bottom-nav ul,
.bottom-nav__list {
    display: flex !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 4px 8px 2px !important;
    width: 100%;
    max-width: 480px;
    min-height: var(--bnav-height) !important;
    height: auto !important;
    align-items: stretch;
    justify-content: space-around;
    gap: 2px;
    box-sizing: border-box !important;
    overflow: visible !important;
}

.bottom-nav li,
.bottom-nav__item {
    flex: 1 1 0 !important;
    display: flex !important;
    align-items: stretch;
    justify-content: center;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    max-width: none;
    min-width: 0;
    overflow: visible !important;
}

/* ============================================================
   LINKS
   ============================================================ */

.bottom-nav-link {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
    min-height: 48px;
    min-width: 0;
    padding: 6px 4px 5px !important;
    margin: 0;
    border: none;
    border-radius: 14px;
    text-decoration: none !important;
    color: var(--bnav-inactive) !important;
    background: transparent !important;
    font-weight: 500;
    box-sizing: border-box;
    position: relative;
    overflow: visible !important;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.bottom-nav-link:active {
    transform: scale(0.94);
    transition-duration: 0.08s;
}

.bottom-nav__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 28px;
    border-radius: 16px;
    background: transparent;
    transition: background 0.2s ease, transform 0.2s ease;
}

.bottom-nav-icon {
    width: 24px !important;
    height: 24px !important;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    flex-shrink: 0;
    display: block;
    transition: stroke-width 0.2s ease, transform 0.2s ease;
}

.bottom-nav__label {
    display: block !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
    font-size: 10px;
    font-weight: 510;
    line-height: 1.15;
    letter-spacing: 0.01em;
    text-transform: none;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

/* ============================================================
   ACTIVE / MENU-OPEN STATE
   ============================================================ */

.bottom-nav-link.active,
.bottom-nav-link[aria-current="page"],
body.nx-mobile-nav-open #nx-nav-toggler-bottom,
.bottom-nav-link.menu-active {
    color: var(--bnav-active) !important;
    background: transparent !important;
}

.bottom-nav-link.active .bottom-nav__icon-wrap,
.bottom-nav-link[aria-current="page"] .bottom-nav__icon-wrap,
body.nx-mobile-nav-open #nx-nav-toggler-bottom .bottom-nav__icon-wrap,
.bottom-nav-link.menu-active .bottom-nav__icon-wrap {
    background: color-mix(in srgb, var(--bnav-active) 14%, transparent);
    transform: translateY(-1px);
}

@supports not (background: color-mix(in srgb, white 50%, transparent)) {
    .bottom-nav-link.active .bottom-nav__icon-wrap,
    .bottom-nav-link[aria-current="page"] .bottom-nav__icon-wrap,
    body.nx-mobile-nav-open #nx-nav-toggler-bottom .bottom-nav__icon-wrap,
    .bottom-nav-link.menu-active .bottom-nav__icon-wrap {
        background: rgba(13, 110, 253, 0.12);
    }
}

.bottom-nav-link.active .bottom-nav-icon,
.bottom-nav-link[aria-current="page"] .bottom-nav-icon,
body.nx-mobile-nav-open #nx-nav-toggler-bottom .bottom-nav-icon,
.bottom-nav-link.menu-active .bottom-nav-icon {
    stroke-width: 2.15;
    transform: none;
    fill: none;
}

.bottom-nav-link.active .bottom-nav__label,
.bottom-nav-link[aria-current="page"] .bottom-nav__label,
body.nx-mobile-nav-open #nx-nav-toggler-bottom .bottom-nav__label,
.bottom-nav-link.menu-active .bottom-nav__label {
    font-weight: 600;
    color: var(--bnav-active);
}

/* Remove legacy dot / pill clutter */
.bottom-nav-link::after,
.bottom-nav-link.active::after,
.bottom-nav-link[aria-current="page"]::after,
body.nx-mobile-nav-open #nx-nav-toggler-bottom::after,
.bottom-nav-link.menu-active::after {
    content: none !important;
    display: none !important;
}

/* ============================================================
   HOVER (pointer devices)
   ============================================================ */

@media (hover: hover) and (pointer: fine) {
    .bottom-nav-link:hover {
        color: var(--text-primary, #1c1c1e) !important;
        background: transparent !important;
    }

    .bottom-nav-link:hover .bottom-nav__icon-wrap {
        background: color-mix(in srgb, var(--bnav-inactive) 12%, transparent);
    }

    .bottom-nav-link.active:hover,
    .bottom-nav-link[aria-current="page"]:hover {
        color: var(--bnav-active) !important;
    }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

.bottom-nav-link:focus-visible {
    outline: 2px solid var(--bnav-active);
    outline-offset: 2px;
    border-radius: 14px;
}

.bottom-nav-link:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 375px) {
    .bottom-nav {
        --bnav-height: 54px;
    }

    .bottom-nav ul,
    .bottom-nav__list {
        padding: 3px 4px 1px !important;
    }

    .bottom-nav__icon-wrap {
        width: 40px;
        height: 26px;
    }

    .bottom-nav-icon {
        width: 22px !important;
        height: 22px !important;
    }

    .bottom-nav__label {
        font-size: 9.5px;
    }
}

@media (min-width: 376px) and (max-width: 480px) {
    .bottom-nav ul,
    .bottom-nav__list {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* ============================================================
   BODY OFFSET (content not covered by tab bar)
   ============================================================ */

@media (max-width: 991.98px) {
    body {
        padding-bottom: calc(var(--bnav-height, 56px) + 8px) !important;
    }

    @supports (padding: max(0px)) {
        body {
            padding-bottom: calc(var(--bnav-height, 56px) + 8px + env(safe-area-inset-bottom, 0px)) !important;
        }
    }
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0 !important;
    }
}

@media (max-width: 375px) {
    body {
        padding-bottom: calc(54px + 8px) !important;
    }

    @supports (padding: max(0px)) {
        body {
            padding-bottom: calc(54px + 8px + env(safe-area-inset-bottom, 0px)) !important;
        }
    }
}
