/* ==========================================================================
   Wali portal bottom nav — model Minhajul Haq (modern + transparent)
   ========================================================================== */

:root {
    --mh-float-size: 4.25rem;
    --mh-ink: rgba(55, 65, 81, 0.78);
}

/* Root = floating bar */
.and-bottom-nav.and-mh-bottom {
    display: flex !important;
    align-items: flex-end;
    justify-content: stretch;
    gap: 0.625rem;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 150;
    padding: 0.4rem 0.65rem max(0.4rem, env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    pointer-events: none;
}

.and-bottom-nav.and-mh-bottom[hidden],
.and-bottom-nav.and-mh-bottom.is-suppressed {
    display: none !important;
}

.and-mh-bottom .and-bottom-nav__shell,
.and-mh-bottom .and-bottom-nav__side,
.and-mh-bottom .and-bottom-nav__fab-slot,
.and-mh-bottom .and-bottom-nav__indicator {
    display: none !important;
}

/* Dock — glass solid agar icon aktif terbaca */
.and-mh-bottom .mobile-bottom-dock {
    position: relative;
    z-index: 170;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    overflow: visible;
    pointer-events: auto;
    border-radius: 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
    backdrop-filter: blur(18px) saturate(1.35);
    box-shadow:
        0 10px 28px -12px rgba(15, 23, 42, 0.28),
        0 2px 8px rgba(15, 23, 42, 0.06);
}

/* 5 tab */
.and-mh-bottom .mobile-float-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    gap: 0;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: var(--mh-float-size);
    min-height: var(--mh-float-size);
    padding: 0 0.2rem;
    box-sizing: border-box;
}

.and-mh-bottom .mobile-float-nav-item {
    --nav-accent: #ff5a00;
    --nav-accent-soft: #fff1e8;
    --nav-accent-ink: #c2410c;
    display: grid;
    grid-template-rows: auto auto;
    align-content: center;
    justify-items: center;
    gap: 0.2rem;
    min-width: 0;
    min-height: 0;
    padding: 0.2rem 0.1rem;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #64748b;
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: color 180ms ease, transform 160ms ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.and-mh-bottom .mobile-float-nav-item--home {
    --nav-accent: #ff5a00;
    --nav-accent-soft: #fff1e8;
    --nav-accent-ink: #c2410c;
}
.and-mh-bottom .mobile-float-nav-item--sabaq {
    --nav-accent: #ef4444;
    --nav-accent-soft: #fee2e2;
    --nav-accent-ink: #b91c1c;
}
.and-mh-bottom .mobile-float-nav-item--manzil {
    --nav-accent: #14b8a6;
    --nav-accent-soft: #ccfbf1;
    --nav-accent-ink: #0f766e;
}
.and-mh-bottom .mobile-float-nav-item--sabqi {
    --nav-accent: #ca8a04;
    --nav-accent-soft: #fef9c3;
    --nav-accent-ink: #a16207;
}
.and-mh-bottom .mobile-float-nav-item--absensi {
    --nav-accent: #2563eb;
    --nav-accent-soft: #dbeafe;
    --nav-accent-ink: #1d4ed8;
}

.and-mh-bottom .mobile-float-nav-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    border-radius: 0.95rem;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: none;
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 140ms ease;
}

.and-mh-bottom .mobile-float-nav-icon {
    display: block;
    width: 1.4rem;
    height: 1.4rem;
    flex-shrink: 0;
    overflow: visible;
    color: inherit;
}

.and-mh-bottom .mobile-float-nav-icon .mh-icon-fill {
    fill: currentColor;
    fill-opacity: 0.18;
    stroke: none;
}

.and-mh-bottom .mobile-float-nav-icon .mh-icon-stroke {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.45;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.and-mh-bottom .mobile-float-nav-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    color: inherit;
}

.and-mh-bottom .mobile-float-nav-item.is-active {
    color: var(--nav-accent-ink);
}

.and-mh-bottom .mobile-float-nav-item.is-active .mobile-float-nav-icon-wrap {
    background: var(--nav-accent);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 8px 18px -8px rgba(15, 23, 42, 0.35), 0 2px 6px rgba(15, 23, 42, 0.12);
}

.and-mh-bottom .mobile-float-nav-item--home.is-active .mobile-float-nav-icon-wrap {
    box-shadow: 0 8px 18px -6px rgba(255, 90, 0, 0.55), 0 2px 6px rgba(15, 23, 42, 0.1);
}
.and-mh-bottom .mobile-float-nav-item--sabaq.is-active .mobile-float-nav-icon-wrap {
    box-shadow: 0 8px 18px -6px rgba(239, 68, 68, 0.55), 0 2px 6px rgba(15, 23, 42, 0.1);
}
.and-mh-bottom .mobile-float-nav-item--manzil.is-active .mobile-float-nav-icon-wrap {
    box-shadow: 0 8px 18px -6px rgba(20, 184, 166, 0.55), 0 2px 6px rgba(15, 23, 42, 0.1);
}
.and-mh-bottom .mobile-float-nav-item--sabqi.is-active .mobile-float-nav-icon-wrap {
    box-shadow: 0 8px 18px -6px rgba(202, 138, 4, 0.5), 0 2px 6px rgba(15, 23, 42, 0.1);
}
.and-mh-bottom .mobile-float-nav-item--absensi.is-active .mobile-float-nav-icon-wrap {
    box-shadow: 0 8px 18px -6px rgba(37, 99, 235, 0.55), 0 2px 6px rgba(15, 23, 42, 0.1);
}

.and-mh-bottom .mobile-float-nav-item.is-active .mobile-float-nav-icon .mh-icon-fill {
    fill: #ffffff;
    fill-opacity: 0.95;
}

.and-mh-bottom .mobile-float-nav-item.is-active .mobile-float-nav-icon .mh-icon-stroke {
    stroke: #ffffff;
    stroke-width: 2.2;
}

.and-mh-bottom .mobile-float-nav-item.is-active .mobile-float-nav-label {
    color: var(--nav-accent-ink);
    font-weight: 800;
}

.and-mh-bottom .mobile-float-nav-item:active {
    transform: scale(0.97);
}

.and-mh-bottom .mobile-float-nav-item.is-pressing .mobile-float-nav-icon-wrap,
.and-mh-bottom .mobile-float-nav-item:active .mobile-float-nav-icon-wrap {
    transform: scale(0.94);
}

body.and-body--wali-nav .and-main--dashboard,
body.and-body--wali-nav .and-main--thz-dash,
body.and-body--wali-nav .and-layout--home,
body.and-body--wali-nav .and-main--wali-portal {
    padding-bottom: calc(var(--mh-float-size) + 1.5rem + env(safe-area-inset-bottom, 0px)) !important;
}

@media (prefers-reduced-motion: reduce) {
    .and-mh-bottom .mobile-float-nav-item,
    .and-mh-bottom .mobile-float-nav-icon-wrap {
        transition: none;
    }
}
