/* IDL Learn – inside the App Store and Play Store apps only (html.is-app is set by core/native.js).
   Nothing here applies in a browser. */

/* Safe areas: the app runs edge to edge; keep the header clear of the notch and status bar,
   the drawer and the learner's tab bar clear of the home indicator. Android passes the values
   as --safe-area-inset-*, iOS as env(). */
html.is-app {
    --app-top: max(var(--safe-area-inset-top, 0px), env(safe-area-inset-top, 0px), var(--app-top-min, 0px));
    --app-bottom: max(var(--safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
    --app-left: var(--safe-area-inset-left, env(safe-area-inset-left, 0px));
    --app-right: var(--safe-area-inset-right, env(safe-area-inset-right, 0px));
}
html.is-app body { padding-left: var(--app-left); padding-right: var(--app-right); -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
html.is-app .header { padding-top: var(--app-top); }
/* Solid strip behind the status bar, so a scrolled page stops below the phone's clock and icons.
   Sits just under the header (50), which keeps its own colour, and above the page content. */
html.is-app body::before { content: ''; position: fixed; top: 0; left: 0; right: 0; z-index: 49; height: var(--app-top); background: inherit; pointer-events: none; }
html.is-app body.has-shell .side { padding-top: var(--app-top); padding-bottom: var(--app-bottom); }
html.is-app .modal { padding-top: calc(6vh + var(--app-top)); padding-bottom: calc(16px + var(--app-bottom)); }
html.is-app .toasts { bottom: calc(16px + var(--app-bottom)); }
html.is-app .auth:not(.auth--app) { padding-top: calc(24px + var(--app-top)); padding-bottom: calc(24px + var(--app-bottom)); }
@media (max-width: 720px) {
    html.is-app body.role-learner .tabbar { padding-bottom: calc(6px + var(--app-bottom)); }
    html.is-app body.role-learner #app { padding-bottom: calc(76px + var(--app-bottom)); }
    html.is-app body.role-learner .toasts { bottom: calc(84px + var(--app-bottom)); }
}

/* No purchases in the app: plans and payments are handled on the website */
html.is-app a[href="#/plans"], html.is-app a[href^="#/plans?"], html.is-app a[href^="#/join"],
html.is-app .auth__plans, html.is-app [data-pay], html.is-app [data-renew], html.is-app #add-child { display: none !important; }
html.is-app .top--out .side__brand { margin-right: auto; }   /* the hidden Plans link used to push Sign in to the right */
