/* entraEd app layer: quick dock, page progress, offline notice and install prompt.
   Shared by the public site, dashboards and partner portal. */
/* ---------- Typography system: Plus Jakarta Sans public headings, Inter interface and body, Noto Sans Devanagari for Nepali ---------- */
@font-face { font-family: "Plus Jakarta Sans Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 600 800; size-adjust: 102.5%; ascent-override: 101.5%; descent-override: 21.5%; line-gap-override: 0%; }
@font-face { font-family: "Plus Jakarta Sans Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 300 500; size-adjust: 106.6%; ascent-override: 97.5%; descent-override: 20.6%; line-gap-override: 0%; }
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 300 500; size-adjust: 107.4%; ascent-override: 90%; descent-override: 22.5%; line-gap-override: 0%; }
@font-face { font-family: "Inter Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 600 800; size-adjust: 104%; ascent-override: 90%; descent-override: 22.5%; line-gap-override: 0%; }
:root {
    --font-heading: "Plus Jakarta Sans", "Plus Jakarta Sans Fallback", system-ui, sans-serif;
    --font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-nepali: "Noto Sans Devanagari", "Inter", system-ui, sans-serif;
    --sl-dock-h: 64px;
    --sl-dock-space: calc(var(--sl-dock-h) + env(safe-area-inset-bottom, 0px));
}

/* ---------- Quick dock: clean white app bar attached to the bottom edge ---------- */
.sl-dock {
    --sl-dock-bg: #FFFFFF;
    display: none; position: fixed; z-index: 110; left: 0; right: 0; bottom: 0;
    padding: 0 max(8px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(8px, env(safe-area-inset-left, 0px));
    background: var(--sl-dock-bg);
    box-shadow: 0 -1px 0 #E3E9F3, 0 -10px 28px rgba(17, 28, 68, 0.07);
    transition: transform 0.28s cubic-bezier(.2, .8, .2, 1);
    font-family: var(--font-body);
}
.sl-dock.is-hidden { transform: translateY(100%); }
.sl-dock-list { display: flex; align-items: stretch; max-width: 640px; height: var(--sl-dock-h); margin: 0 auto; padding: 0; list-style: none; }
.sl-dock-list > li { flex: 1 1 0; min-width: 0; display: flex; }
.sl-dock-item {
    position: relative; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    margin: 0; padding: 8px 2px 7px; border: 0; background: none; cursor: pointer;
    color: #64748B !important; text-decoration: none !important; -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease;
}
.sl-dock-item::before {
    content: ""; position: absolute; top: 0; left: 50%; width: 30px; height: 3px; margin-left: -15px; border-radius: 0 0 4px 4px;
    background: #3657A4; transform: scaleX(0); transition: transform 0.22s cubic-bezier(.2, .8, .2, 1);
}
.sl-dock-item:hover { color: #111C44 !important; }
.sl-dock-item:focus-visible { outline: none; }
.sl-dock-item:focus-visible .sl-dock-icon { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #3657A4; }
.sl-dock-icon {
    position: relative; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 30px; border-radius: 999px;
    transition: transform 0.15s ease;
}
.sl-dock-item:active .sl-dock-icon { transform: scale(0.9); }
.sl-dock-svg { width: 24px; height: 24px; display: block; overflow: visible; }
.sl-dock-svg .di-s { display: none; }
.sl-dock-svg .di-cut { fill: none; stroke: var(--sl-dock-bg); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sl-dock-svg .di-bold { fill: none; stroke: currentColor; stroke-width: 3.1; stroke-linecap: round; stroke-linejoin: round; }
.sl-dock-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; line-height: 1.1; letter-spacing: 0.01em; }
.sl-dock-item.is-active { color: #3657A4 !important; }
.sl-dock-item.is-active::before { transform: scaleX(1); }
.sl-dock-item.is-active .di-o { display: none; }
.sl-dock-item.is-active .di-s { display: inline; }
.sl-dock-item.is-active .sl-dock-label { font-weight: 700; }
.sl-dock-badge {
    position: absolute; top: -4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    background: #E5383B; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--sl-dock-bg);
}

/* Show on phones and tablets; reserve space so nothing sits behind the bar */
@media (max-width: 1199px) {
    .sl-dock--public { display: block; }
    body.sl-site .sl-footer { padding-bottom: calc(var(--sl-dock-space) + 8px); }
    body.sl-site .sl-compare-bar { bottom: var(--sl-dock-space); }
    body.sl-site .cookie-consent-wrap { bottom: calc(var(--sl-dock-space) + 12px) !important; }
}
@media (max-width: 1023px) {
    .sl-dock--dashboard { display: block; z-index: 1020; }
    body.ip-app .zMainContent { padding-bottom: calc(var(--sl-dock-space) + 16px) !important; }
    body.ip-app .cookie-consent-wrap { bottom: calc(var(--sl-dock-space) + 12px) !important; }
}
@media (max-width: 1024px) {
    .sl-dock--partner { display: block; z-index: 45; }
    body.slp-body .slp-main { padding-bottom: calc(var(--sl-dock-space) + 16px); }
}
@media (max-width: 400px) {
    .sl-dock { padding-left: 4px; padding-right: 4px; }
    .sl-dock-icon { width: 42px; }
    .sl-dock-label { font-size: 10.5px; letter-spacing: 0; }
}
/* ---------- Page progress (shown while the next page loads) ---------- */
.sl-app-progress {
    position: fixed; z-index: 2000; top: 0; left: 0; height: 3px; width: 0; pointer-events: none;
    background: linear-gradient(90deg, #F4C542, #3657A4); box-shadow: 0 0 8px rgba(54, 87, 164, 0.5);
    opacity: 0; transition: width 8s cubic-bezier(.1, .7, .1, 1), opacity 0.3s ease;
}
.sl-app-progress.is-loading { width: 85%; opacity: 1; }

/* ---------- Offline / back online notice ---------- */
.sl-app-toast {
    position: fixed; z-index: 1900; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    display: inline-flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 12px 16px;
    border-radius: 14px; background: #111C44; color: #fff; box-shadow: 0 14px 30px rgba(17, 28, 68, 0.3);
    font: 600 14px/1.35 "Inter", system-ui, sans-serif; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.sl-app-toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.sl-app-toast.is-online { background: #157A52; }
.sl-app-toast .sl-icon { flex: 0 0 auto; color: #F4C542; }
.sl-app-toast.is-online .sl-icon { color: #fff; }
@media (max-width: 1199px) { body.sl-site .sl-app-toast { bottom: calc(var(--sl-dock-space) + 8px); } }
@media (max-width: 1023px) { body.ip-app .sl-app-toast { bottom: calc(var(--sl-dock-space) + 8px); } }
@media (max-width: 1024px) { body.slp-body .sl-app-toast { bottom: calc(var(--sl-dock-space) + 8px); } }

/* ---------- Scrollbars ----------
   Chromium and Safari use the ::-webkit-scrollbar rules; Firefox gets the standard colour properties.
   Elements that set their own scrollbar-width or scrollbar-color keep their styling. */
@supports not selector(::-webkit-scrollbar) {
    html { scrollbar-color: #A9B8D8 #EDF3FA; }
    * { scrollbar-width: thin; scrollbar-color: rgba(100, 116, 139, 0.5) transparent; }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: rgba(100, 116, 139, 0.45) padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(54, 87, 164, 0.8); }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 14px; height: 14px; }
html::-webkit-scrollbar-track, body::-webkit-scrollbar-track { background: #EDF3FA; box-shadow: inset 1px 0 0 #DFE6F1; }
html::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb { min-height: 48px; border: 4px solid #EDF3FA; background: #A9B8D8 border-box; }
html::-webkit-scrollbar-thumb:hover, body::-webkit-scrollbar-thumb:hover { background-color: #3657A4; }
html::-webkit-scrollbar-thumb:active, body::-webkit-scrollbar-thumb:active { background-color: #111C44; }

/* ---------- Back to top (discreet) ---------- */
.sl-top {
    position: fixed; z-index: 105; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    display: grid; place-items: center; width: 40px; height: 40px; margin: 0; padding: 0; border: 1px solid #CFD8E6; border-radius: 10px;
    background: rgba(255, 255, 255, 0.96); color: #111C44; cursor: pointer; -webkit-tap-highlight-color: transparent;
    box-shadow: 0 1px 2px rgba(17, 28, 68, 0.06), 0 8px 20px rgba(17, 28, 68, 0.08);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s, bottom 0.25s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.sl-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.sl-top:hover { background: #EDF3FA; border-color: #3657A4; }
.sl-top:active { transform: scale(0.96); }
.sl-top:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff, 0 0 0 6px #3657A4; }
.sl-top-ring { display: none; }
.sl-top-icon { position: relative; width: 18px; height: 18px; }
.direction-rtl .sl-top { right: auto; left: max(16px, env(safe-area-inset-left, 0px)); }
@media (max-width: 575px) {
    .sl-top { right: max(12px, env(safe-area-inset-right, 0px)); width: 40px; height: 40px; }
    .direction-rtl .sl-top { right: auto; left: max(12px, env(safe-area-inset-left, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
    .sl-top { transition: opacity 0.01s linear, visibility 0s; transform: none; }
}

/* ---------- Install app ---------- */
[data-app-install][hidden] { display: none !important; }
.sl-app-install {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid #CFD8E6; border-radius: 12px;
    background: #fff; color: #111C44; font: 600 14px/1 "Inter", system-ui, sans-serif; cursor: pointer;
}
.sl-app-install:hover { background: #EDF3FA; }

/* ---------- Installed (standalone) app ---------- */
html.is-standalone body { overscroll-behavior-y: none; }
html.is-standalone .sl-app-install { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    .sl-dock, .sl-dock-item, .sl-app-progress, .sl-app-toast, .sl-top, .sl-top-ring-value { transition: none; }
}
@media print {
    .sl-dock, .sl-app-progress, .sl-app-toast, .sl-top { display: none !important; }
}

/* ---------- Brand logo preloader (small, calm — not cartoon) ---------- */
#preloader.sl-preloader,
.sl-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 24px;
    background: #F7F9FC;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}
.sl-preloader.is-done {
    opacity: 0;
    visibility: hidden;
}
.sl-preloader-inner,
#preloader-status,
#preloader_status {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
}
.sl-preloader-mark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.sl-preloader-logo,
#preloader.sl-preloader img,
.sl-preloader img {
    display: block;
    width: auto;
    max-width: 132px;
    height: auto;
    max-height: 36px;
    object-fit: contain;
    animation: sl-preloader-breathe 1.6s ease-in-out infinite;
}
.sl-preloader-bar {
    position: relative;
    display: block;
    width: 72px;
    height: 2px;
    overflow: hidden;
    border-radius: 999px;
    background: #D7E0EE;
}
.sl-preloader-bar-run {
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3657A4, #F4C542);
    animation: sl-preloader-bar 1.1s ease-in-out infinite;
}
@keyframes sl-preloader-breathe {
    0%, 100% { opacity: 0.72; }
    50% { opacity: 1; }
}
@keyframes sl-preloader-bar {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}
@media (prefers-reduced-motion: reduce) {
    .sl-preloader-logo,
    #preloader.sl-preloader img,
    .sl-preloader img,
    .sl-preloader-bar-run {
        animation: none;
    }
    .sl-preloader-logo,
    #preloader.sl-preloader img,
    .sl-preloader img { opacity: 1; }
    .sl-preloader-bar-run { left: 30%; width: 40%; }
}

/* Legacy vendor size override — keep brand mark small */
#preloader img { max-width: 132px !important; max-height: 36px !important; }


/* ---------- Cookie notice (all layouts) ---------- */
.cookie-consent-wrap {
    position: fixed !important; z-index: 1001; left: 24px; right: auto; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 48px); max-width: 440px; margin: 0; padding: 0 !important;
    background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; overflow: visible !important;
    pointer-events: none;
}
.sl-cookie {
    pointer-events: auto; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; gap: 4px 14px;
    padding: 18px 20px; border: 1px solid #E5EAF2; border-radius: 18px; background: #fff; color: #243047;
    box-shadow: 0 18px 44px rgba(17, 28, 68, 0.22), 0 2px 6px rgba(17, 28, 68, 0.08);
    font-family: var(--font-body);
    animation: sl-cookie-in 0.35s cubic-bezier(.2, .8, .2, 1) both;
}
.sl-cookie-icon { grid-row: span 2; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #FDF3D3; color: #8A5A00; }
.sl-cookie-text { margin: 0; font-size: 14.5px; line-height: 1.55; color: #243047; }
.sl-cookie-text a { color: #3657A4; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.sl-cookie-btn {
    justify-self: start; margin-top: 10px; min-height: 42px; padding: 0 20px; border: 0; border-radius: 12px;
    background: #F4C542; color: #111C44; font: 700 14.5px/1 "Inter", system-ui, sans-serif; cursor: pointer;
    box-shadow: 0 6px 16px rgba(244, 197, 66, 0.35); transition: background-color 0.15s ease, transform 0.12s ease;
}
.sl-cookie-btn:hover { background: #E9B92F; }
.sl-cookie-btn:active { transform: scale(0.97); }
.sl-cookie-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff, 0 0 0 6px #111C44; }
@keyframes sl-cookie-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Dashboards: keep clear of the sidebar */
body.ip-app .cookie-consent-wrap { left: auto; right: 24px; }

/* Phones: full-width card above the quick dock */
@media (max-width: 575px) {
    .cookie-consent-wrap, body.ip-app .cookie-consent-wrap { left: 12px; right: 12px; width: auto; max-width: none; }
    .sl-cookie { grid-template-columns: 36px minmax(0, 1fr); padding: 16px; border-radius: 16px; }
    .sl-cookie-icon { width: 36px; height: 36px; grid-row: auto; }
    .sl-cookie-btn { grid-column: 1 / -1; justify-self: stretch; min-height: 46px; margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { .sl-cookie { animation: none; } }
@media print { .cookie-consent-wrap { display: none !important; } }
