/* /public_html/assets/css/ui-mobile-topbar.css */

@media (max-width: 719px) {
    body.is-dashboard-shell-visible .app-header {
        position: fixed;
        top: 0;
        display: block;
        min-height: calc(env(safe-area-inset-top, 0px) + 3.25rem);
        height: calc(env(safe-area-inset-top, 0px) + 3.25rem);
        padding: 0;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-bottom: 0 !important;
        box-shadow: none !important;
        overflow: visible;
    }

    body.is-dashboard-shell-visible .app-header > :not(.mobile-shell-navbar) {
        display: none !important;
    }

    body.is-dashboard-shell-visible #app-root {
        padding-top: calc(env(safe-area-inset-top, 0px) + 3.25rem) !important;
    }

    body.is-dashboard-shell-visible #dashboard-app-shell,
    body.is-dashboard-shell-visible .dashboard-app-main {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    body.is-dashboard-shell-visible #dashboard-view {
        margin-top: 0 !important;
        padding-top: 0.75rem !important;
        min-height: calc(100vh - (env(safe-area-inset-top, 0px) + 3.25rem));
    }

    @supports (height: 100dvh) {
        body.is-dashboard-shell-visible #dashboard-view {
            min-height: calc(100dvh - (env(safe-area-inset-top, 0px) + 3.25rem));
        }
    }

    body.is-dashboard-shell-visible .app-header::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        z-index: 0;
        background: color-mix(in srgb, var(--color-bg, #020617) 14%, transparent);
        backdrop-filter: blur(20px) saturate(1.12);
        -webkit-backdrop-filter: blur(20px) saturate(1.12);

        -webkit-mask-image: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 1) 60%,
            rgba(0, 0, 0, 0.82) 76%,
            rgba(0, 0, 0, 0.46) 88%,
            rgba(0, 0, 0, 0.12) 96%,
            rgba(0, 0, 0, 0) 100%
        );
        mask-image: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 1) 60%,
            rgba(0, 0, 0, 0.82) 76%,
            rgba(0, 0, 0, 0.46) 88%,
            rgba(0, 0, 0, 0.12) 96%,
            rgba(0, 0, 0, 0) 100%
        );
    }



    html.is-dashboard-shell-scroll-locked,
    body.is-dashboard-shell-scroll-locked {
        height: 100%;
        overflow: hidden;
        overscroll-behavior-y: none;
    }

    body.is-dashboard-shell-visible.is-dashboard-shell-scroll-locked #app-root,
    body.is-dashboard-shell-visible.is-dashboard-shell-scroll-locked #dashboard-app-shell,
    body.is-dashboard-shell-visible.is-dashboard-shell-scroll-locked .dashboard-app-main,
    body.is-dashboard-shell-visible.is-dashboard-shell-scroll-locked #dashboard-view {
        overscroll-behavior-y: none;
    }
    .mobile-shell-navbar {
        position: relative;
        z-index: 1;
        display: block;
        width: 100%;
        height: 100%;
        min-height: calc(env(safe-area-inset-top, 0px) + 3.25rem);
        padding-top: env(safe-area-inset-top, 0px);
        padding-inline: 0.75rem;
    }

    .mobile-shell-navbar.is-hidden {
        display: none !important;
    }

    .mobile-shell-navbar__left,
    .mobile-shell-navbar__center,
    .mobile-shell-navbar__right {
        position: absolute;
        top: calc(env(safe-area-inset-top, 0px) + 1.625rem);
        transform: translateY(-50%);
        min-height: 2.5rem;
        z-index: 2;
    }

    .mobile-shell-navbar__left {
        left: 0.75rem;
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
    }

    .mobile-shell-navbar__right {
        right: 0.75rem;
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.45rem;
    }

    .mobile-shell-navbar__center {
        --mobile-shell-navbar-side-width: 2.75rem;
        --mobile-shell-navbar-title-gutter: 0.5rem;
        left: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        align-items: center;
        justify-content: center;
        width: calc(100% - ((var(--mobile-shell-navbar-side-width) + 0.75rem) * 2));
        max-width: calc(100% - 1.5rem);
        min-width: 0;
        font-size: 1rem;
        font-weight: 800;
        line-height: 1.1;
        text-align: center;
        overflow: hidden;
        pointer-events: none;
        z-index: 1;
    }

    .mobile-shell-navbar.is-dashboard .mobile-shell-navbar__center {
        --mobile-shell-navbar-side-width: 2.75rem;
    }

    .mobile-shell-navbar__title-viewport {
        display: block;
        width: 100%;
        min-width: 0;
        overflow: hidden;
        white-space: nowrap;
        box-sizing: border-box;
    }

    .mobile-shell-navbar__title-window {
        display: block;
        width: calc(100% - (var(--mobile-shell-navbar-title-gutter) * 2));
        margin-inline: var(--mobile-shell-navbar-title-gutter);
        min-width: 0;
        overflow: hidden;
        box-sizing: border-box;
        text-align: left;
    }

    .mobile-shell-navbar__title-track {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-width: 0;
        will-change: transform;
        transform: translate3d(0, 0, 0);
    }

    .mobile-shell-navbar__title-text {
        display: block;
        white-space: nowrap;
        max-width: none;
    }

    .mobile-shell-navbar.has-title-marquee .mobile-shell-navbar__title-track {
        justify-content: flex-start;
        width: max-content;
    }

    .mobile-shell-navbar__logo {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto;
        max-width: 9rem;
        max-height: 3rem;
    }

    .mobile-shell-navbar__logo .app-logo,
    .mobile-shell-navbar__logo .app-brand-btn,
    .mobile-shell-navbar__logo .app-brand-label {
        display: none !important;
    }

    .mobile-shell-navbar__logo svg,
    .mobile-shell-navbar__logo img {
        display: block;
        width: auto;
        max-width: 100%;
        max-height: 3rem;
    }

    .mobile-shell-navbar__btn {
        --mobile-shell-navbar-btn-border: color-mix(in srgb, var(--color-border-subtle, rgba(255,255,255,0.18)) 78%, transparent);
        --mobile-shell-navbar-btn-bg: color-mix(in srgb, var(--color-surface, rgba(255,255,255,0.08)) 34%, transparent);
        --mobile-shell-navbar-btn-shadow: none;
        width: 2.5rem;
        min-width: 2.5rem;
        height: 2.5rem;
        min-height: 2.5rem;
        padding: 0;
        border-radius: 999px;
        border: 1px solid var(--mobile-shell-navbar-btn-border);
        background: var(--mobile-shell-navbar-btn-bg);
        backdrop-filter: blur(18px) saturate(1.1);
        -webkit-backdrop-filter: blur(18px) saturate(1.1);
        color: inherit;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: var(--mobile-shell-navbar-btn-shadow);
    }

    .mobile-shell-navbar__btn--primary {
        --mobile-shell-navbar-btn-border: color-mix(in srgb, var(--theme-primary, #38bdf8) 50%, rgba(255,255,255,0.12));
        --mobile-shell-navbar-btn-bg: linear-gradient(135deg, rgba(56, 189, 248, 0.24), rgba(14, 165, 233, 0.24));
        --mobile-shell-navbar-btn-shadow: 0 10px 24px rgba(14, 165, 233, 0.20);
        color: #e0f2fe;
    }

    html[data-theme="light"] .mobile-shell-navbar__btn--primary {
        --mobile-shell-navbar-btn-border: color-mix(in srgb, var(--theme-primary, #38bdf8) 34%, rgba(15,23,42,0.08));
        --mobile-shell-navbar-btn-bg: linear-gradient(135deg, rgba(224, 242, 254, 0.96), rgba(186, 230, 253, 0.96));
        --mobile-shell-navbar-btn-shadow: 0 8px 22px rgba(14, 165, 233, 0.16);
        color: #075985;
    }

    .mobile-shell-navbar__btn--success {
        --mobile-shell-navbar-btn-border: color-mix(in srgb, #22c55e 56%, rgba(255,255,255,0.14));
        --mobile-shell-navbar-btn-bg: linear-gradient(135deg, rgba(34, 197, 94, 0.28), rgba(22, 163, 74, 0.28));
        --mobile-shell-navbar-btn-shadow: 0 10px 24px rgba(34, 197, 94, 0.18);
        color: #dcfce7;
    }

    html[data-theme="light"] .mobile-shell-navbar__btn--success {
        --mobile-shell-navbar-btn-border: color-mix(in srgb, #22c55e 34%, rgba(15,23,42,0.08));
        --mobile-shell-navbar-btn-bg: linear-gradient(135deg, rgba(220, 252, 231, 0.98), rgba(187, 247, 208, 0.98));
        --mobile-shell-navbar-btn-shadow: 0 8px 22px rgba(34, 197, 94, 0.15);
        color: #166534;
    }

    .mobile-shell-navbar__btn--danger {
        --mobile-shell-navbar-btn-border: color-mix(in srgb, #ef4444 58%, rgba(255,255,255,0.14));
        --mobile-shell-navbar-btn-bg: linear-gradient(135deg, rgba(239, 68, 68, 0.28), rgba(249, 115, 22, 0.28));
        --mobile-shell-navbar-btn-shadow: 0 10px 24px rgba(239, 68, 68, 0.22);
        color: #ffe4e6;
    }

    html[data-theme="light"] .mobile-shell-navbar__btn--danger {
        --mobile-shell-navbar-btn-border: color-mix(in srgb, #ef4444 36%, rgba(15,23,42,0.08));
        --mobile-shell-navbar-btn-bg: linear-gradient(135deg, rgba(254, 226, 226, 0.96), rgba(255, 237, 213, 0.96));
        --mobile-shell-navbar-btn-shadow: 0 8px 22px rgba(239, 68, 68, 0.18);
        color: #b91c1c;
    }


    .mobile-shell-navbar__btn[data-mobile-shell-menu-trigger="1"].is-menu-open {
        border-color: transparent;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        transform: none;
    }

    .mobile-shell-navbar__btn[data-mobile-shell-menu-trigger="1"].is-menu-open i {
        transform: scale(0.86);
        opacity: 0;
        transition: transform 160ms ease, opacity 160ms ease;
    }

    .mobile-shell-navbar__btn i {
        font-size: 1rem;
        line-height: 1;
    }

    .mobile-shell-navbar__btn.has-badge {
        position: relative;
    }

    .mobile-shell-navbar__btn.has-badge::after {
        content: attr(data-badge-count);
        position: absolute;
        top: -0.18rem;
        right: -0.18rem;
        min-width: 1.08rem;
        height: 1.08rem;
        padding: 0 0.26rem;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #ff4d6d;
        color: #fff;
        font-size: 0.64rem;
        font-weight: 900;
        line-height: 1;
        letter-spacing: -0.01em;
        box-shadow: 0 4px 14px rgba(2, 6, 23, 0.22);
    }

    .mobile-shell-navbar__btn.has-badge.has-badge-priority::after {
        background: #ff4d6d;
        color: #fff;
    }

    .mobile-shell-navbar__btn[data-mobile-shell-menu-trigger="1"].is-menu-open.has-badge::after {
        opacity: 0;
        transform: scale(0.6);
    }

    body.is-dashboard-shell-visible[data-dashboard-shell-topbar-mode="icon"] .panel-mobile-title,
    body.is-dashboard-shell-visible[data-dashboard-shell-topbar-mode="icon"] .students-panel-mobile-title,
    body.is-dashboard-shell-visible[data-dashboard-shell-topbar-mode="icon"] .teachers-panel-mobile-title,
    body.is-dashboard-shell-visible[data-dashboard-shell-topbar-mode="icon"] .edq-panel-shell__mobile-title {
        display: none !important;
    }
}
