/* Mobile shell (native phone) — bottom nav + connectivity banner */
:root {
    --mobile-bg: #f3f5f8;
    --mobile-surface: #ffffff;
    --mobile-text: #14213d;
    --mobile-text-muted: #5b6478;
    --mobile-border: #e5e9f0;
    --mobile-primary: #1a56db;
    --mobile-bottom-h: 64px;
    --mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    --mobile-safe-top: env(safe-area-inset-top, 0px);
    --metro-breakpoint-narrow: 768px;
    --metro-touch-target-min: 48px;
    --mobile-shell-content-pad: calc(var(--mobile-bottom-h) + var(--mobile-safe-bottom) + 1rem);
}

:root[data-theme="dark"] {
    --mobile-bg: #000000;
    --mobile-surface: #0c0c0c;
    --mobile-text: #f5f5f5;
    --mobile-text-muted: #a3a3a3;
    --mobile-border: #232323;
}

.mobile-shell {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--mobile-bg);
    color: var(--mobile-text);
    padding-bottom: calc(var(--mobile-bottom-h) + var(--mobile-safe-bottom));
}

.mobile-shell__body {
    flex: 1;
    min-height: 0;
}

.mobile-shell__body--pull {
    overflow-y: auto;
    overscroll-behavior-y: contain;
}

.mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    height: calc(var(--mobile-bottom-h) + var(--mobile-safe-bottom));
    padding-bottom: var(--mobile-safe-bottom);
    background: var(--mobile-surface);
    border-top: 1px solid var(--mobile-border);
    box-shadow: 0 -4px 16px rgba(20, 33, 61, .06);
}

.mobile-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--mobile-text-muted);
    font-size: 11px;
    font-weight: 600;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav__item i {
    font-size: 22px;
    line-height: 1;
}

.mobile-bottom-nav__item.active {
    color: var(--mobile-primary);
}

.mobile-connectivity-banner {
    position: sticky;
    top: 0;
    z-index: 1100;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.mobile-connectivity-banner--offline {
    background: #fdecea;
    color: #7a0e0e;
    border-bottom: 1px solid #f5c2c0;
}

.mobile-connectivity-banner--online {
    background: #d1e7dd;
    color: #0f5132;
    border-bottom: 1px solid #badbcc;
}

:root[data-theme="dark"] .mobile-connectivity-banner--offline {
    background: rgba(122, 14, 14, 0.35);
    color: #fca5a5;
}

:root[data-theme="dark"] .mobile-connectivity-banner--online {
    background: rgba(15, 81, 50, 0.35);
    color: #86efac;
}

.mobile-pull-hint {
    text-align: center;
    font-size: 12px;
    color: var(--mobile-text-muted);
    padding: 4px 0 8px;
}

/* Dock "More" button */
.dock-more-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: none;
    background: transparent;
    color: var(--mobile-text-muted);
    font-size: 11px;
    font-weight: 600;
    min-height: 48px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}

.dock-more-btn i {
    font-size: 22px;
    line-height: 1;
}

.dock-more-btn--open,
.dock-more-btn:active {
    color: var(--mobile-primary);
}

/* Dock "More" slide-up drawer */
.dock-more-drawer {
    position: fixed;
    inset: 0;
    z-index: 1300;
    pointer-events: none;
}

.dock-more-drawer--open {
    pointer-events: auto;
}

.dock-more-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.dock-more-drawer--open .dock-more-drawer__backdrop {
    background: rgba(0, 0, 0, 0.45);
}

.dock-more-drawer__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--mobile-bottom-h) + var(--mobile-safe-bottom));
    background: var(--mobile-surface);
    border-top: 1px solid var(--mobile-border);
    border-radius: 16px 16px 0 0;
    padding: 8px 0 env(safe-area-inset-bottom, 0px);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -8px 32px rgba(20, 33, 61, 0.12);
}

.dock-more-drawer--open .dock-more-drawer__panel {
    transform: translateY(0);
}

.dock-more-drawer__handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--mobile-border);
    margin: 0 auto 8px;
}

.dock-more-drawer__item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 56px;
    padding: 0 20px;
    border: none;
    background: transparent;
    color: var(--mobile-text);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

.dock-more-drawer__item:active {
    background: var(--mobile-bg);
}

.dock-more-drawer__icon {
    font-size: 22px;
    color: var(--mobile-primary);
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

/* ── Mobile shell active: bottom nav + layout chrome adjustments ── */
.mobile-shell .sidebar,
.mobile-shell .sidebar-backdrop {
    display: none !important;
}

.mobile-shell .page-body,
.mobile-shell .portal-main,
.mobile-shell .portal-body-container,
.mobile-shell .login-bg {
    padding-bottom: var(--mobile-shell-content-pad);
}

.mobile-shell .portal-footer,
.mobile-shell .metro-trust-footer {
    padding-bottom: calc(0.75rem + var(--mobile-bottom-h) + var(--mobile-safe-bottom));
}

.mobile-shell .portal-sidenav {
    display: none;
}

.mobile-shell .metro-fab-stack {
    bottom: calc(var(--mobile-bottom-h) + var(--mobile-safe-bottom) + 0.75rem);
}

.mobile-shell .metro-assist-dock {
    bottom: calc(var(--mobile-bottom-h) + var(--mobile-safe-bottom) + 0.75rem);
}

.mobile-shell .topbar-menu-btn {
    display: none !important;
}

.mobile-shell .main-content {
    margin-left: 0 !important;
    width: 100%;
}

.mobile-shell .metro-layout {
    --sidebar-width: 0px;
}

.mobile-shell .portal-header-inner {
    padding-top: calc(0.5rem + var(--mobile-safe-top));
}

.mobile-shell .portal-header-inner .h5 {
    font-size: 1rem;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-shell .login-bg {
    min-height: 100dvh;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

.mobile-shell .login-bg .card,
.mobile-shell .public-branded-shell {
    max-width: 100%;
}

.mobile-shell input.form-control,
.mobile-shell input.form-select,
.mobile-shell select.form-select,
.mobile-shell textarea.form-control {
    font-size: max(16px, 1rem);
}

.mobile-shell .parks-portal-bottom-nav {
    display: none !important;
}

