﻿/* ===================================
   ANTOLOGA NAVBAR
   Prefix: nb-
   =================================== */

/* MudAppBar root override */
header.mud-appbar.nb {
    background-color: transparent !important;
    height: 6rem !important;
    min-height: 6rem !important;
    padding: 0 2rem !important;
    position: relative !important;
    width: 100%;
    z-index: 1000;
    justify-content: center;
    width: 100%;
}

header.mud-appbar.nb--dark {
    background-color: var(--antologa-dark) !important;
}

/* ---- Logo ---- */
.nb-logo {
    width: 10rem;
    height: auto;
    cursor: pointer;
    flex-shrink: 0;
}

/* ---- Desktop Icons ---- */
.nb-desktop-icons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
}

.nb-icon {
    height: 3rem;
    border-radius: 0.5rem;
    color: var(--antologa-dark) !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nb--dark .nb-icon {
    color: var(--antologa-white) !important;
}

.nb-icon:hover {
    background-color: var(--antologa-dark) !important;
    color: var(--antologa-white) !important;
}

.nb--dark .nb-icon:hover {
    background-color: var(--antologa-white) !important;
    color: var(--antologa-primary) !important;
}

.nb-icon--active {
    color: var(--antologa-primary) !important;
}

/* ---- Desktop Auth ---- */
.nb-desktop-auth {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.nb-btn-ghost {
    min-width: 9rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.05rem;
    color: var(--antologa-dark) !important;
    transition: all 0.2s ease;
}

.nb--dark .nb-btn-ghost {
    color: var(--antologa-white) !important;
}

.nb-btn-ghost:hover {
    background-color: var(--antologa-dark) !important;
    color: var(--antologa-white) !important;
}

.nb--dark .nb-btn-ghost:hover {
    background-color: var(--antologa-white) !important;
    color: var(--antologa-primary) !important;
}

.nb-btn-solid {
    min-width: 9rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.05rem;
    background-color: var(--antologa-primary) !important;
    color: var(--antologa-white) !important;
    transition: all 0.2s ease;
}

    .nb-btn-solid:hover {
        background-color: var(--antologa-dark) !important;
        color: var(--antologa-white) !important;
    }

.nb--dark .nb-btn-solid:hover {
    background-color: var(--antologa-white) !important;
    color: var(--antologa-primary) !important;
}

/* ---- Mobile Auth Icons (hidden on desktop) ---- */
.nb-mobile-auth {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.nb-mobile-icon-btn {
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.nb-mobile-icon-btn--solid {
    background-color: var(--antologa-primary) !important;
    color: var(--antologa-white) !important;
}

/* ---- Mobile Bottom Nav (hidden on desktop) ---- */
.nb-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5rem;
    width: 100%;
    z-index: 1000;
    background-color: var(--antologa-white);
    border-top: 1px solid var(--antologa-light-gray);
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    padding: 0.5rem 0;
}

.nb-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    flex: 1;
    max-width: 5rem;
    height: 100%;
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* MudButton nests the icon + label inside .mud-button-label — force it to
   stack vertically so the icon sits ON TOP of the label, not inline beside it. */
.nb-bottom-item .mud-button-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    .nb-bottom-item .mud-icon-root {
        color: var(--antologa-dark);
        transition: color 0.2s ease;
    }

    .nb-bottom-item .mud-typography {
        font-size: 0.65rem;
        font-weight: 500;
        color: var(--antologa-dark);
        transition: color 0.2s ease;
        margin-top: 0.2rem;
    }

    .nb-bottom-item:hover .mud-icon-root,
    .nb-bottom-item:hover .mud-typography {
        color: var(--antologa-primary);
    }

.nb-bottom-item--active .mud-icon-root {
    color: var(--antologa-primary);
}

.nb-bottom-item--active .mud-typography {
    color: var(--antologa-primary);
    font-weight: 700;
}

/* ===================================
   RESPONSIVE — Tablet and below (≤1279px)
   Unified to 1279px to match the dashboard / MudBlazor lg boundary (lg = 1280+),
   so the whole app flips desktop↔mobile at the same point (no 1px gap at 1280px).
   =================================== */
@media (max-width: 1279px) {

    /* FIX: mobile top bar is transparent on both light and dark mode */
    header.mud-appbar.nb,
    header.mud-appbar.nb--dark {
        background-color: transparent !important;
        padding: 0 1.5rem !important;
    }

    .nb-logo {
        width: 8rem;
    }

    /* Hide desktop elements */
    .nb-desktop-icons,
    .nb-desktop-auth {
        display: none;
    }

    /* Show mobile elements */
    .nb-mobile-auth {
        display: flex;
    }

    .nb-bottom-nav {
        display: flex;
    }
}

/* ── Mobile bottom nav: clean Airbnb-style icon + label ──────────────── */
@media (max-width: 768px) {

    .nb-bottom-nav {
        height: 4.5rem;
        padding: 0.375rem 0 0.5rem;
        box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.04);
    }

    .nb-bottom-item {
        gap: 0.25rem;
        padding: 0.25rem 0.25rem;
    }

        /* Slightly larger, thin-outline icons like the reference design */
        .nb-bottom-item .mud-icon-root {
            font-size: 1.6rem !important;
            width: 1.6rem;
            height: 1.6rem;
            color: #717171; /* neutral gray when inactive */
        }

        .nb-bottom-item .mud-typography {
            font-size: 0.7rem;
            font-weight: 500;
            color: #717171;
            margin-top: 0.15rem;
            line-height: 1;
        }

    /* Active item — brand teal, bold label */
    .nb-bottom-item--active .mud-icon-root {
        color: var(--antologa-primary);
    }

    .nb-bottom-item--active .mud-typography {
        color: var(--antologa-primary);
        font-weight: 700;
    }
}

/* ===================================
   RESPONSIVE — Small Mobile (≤480px)
   =================================== */
@media (max-width: 480px) {

    header.mud-appbar.nb {
        padding: 0 0.75rem !important;
    }

    .nb-logo {
        width: 7rem;
    }

    .nb-bottom-item {
        max-width: 4rem;
    }

        .nb-bottom-item .mud-typography {
            font-size: 0.6rem;
        }
}

