/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   FINEXTIUM NATIVE APP (Android / iOS — mobile-app/, Capacitor)
   EVERY rule here is scoped to html.is-app, which index.html sets ONLY inside the app's WebView
   (user agent carries "FinextiumApp"). The website never matches these selectors.
   Tuned on Samsung Galaxy A56 (1080×2340, ~412×860 CSS px under the system bars).
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

/* ── Native feel: no grey tap flash, no double-tap zoom delay, no rubber-band glow ── */
html.is-app {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
/* NOTE: never put overscroll-behavior on html/body here. On this site BOTH html and body are scroll
   containers, so overscroll-behavior:none on them swallowed every finger swipe — the app could not
   scroll at all (2026-10-26 bug: "no scrolling, portfolios not visible"). Verified with real CDP
   touch events: 0px → 938px once removed. */

/* Controls behave like native controls: no text-selection / long-press callout on tap targets.
   (Content text — reports, analysis, numbers — stays selectable/copyable.) */
html.is-app button,
html.is-app .mobile-bottom-nav,
html.is-app .mobile-nav-btn,
html.is-app .tech-mkt-btn,
html.is-app .ec-tab,
html.is-app .currency-btn,
html.is-app .header-action-btn,
html.is-app .header-bell-btn,
html.is-app .modal-tab,
html.is-app [role="button"] {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
html.is-app img {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

/* ── App toast (js/app-shell.js) ── */
html.is-app .app-toast {
    position: fixed;
    left: 50%;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    transform: translate(-50%, 12px);
    max-width: calc(100vw - 40px);
    padding: 11px 18px;
    border-radius: 12px;
    background: #182033;
    border: 1px solid rgba(0, 229, 255, 0.28);
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 2147483000;
}
html.is-app .app-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ═══ Galaxy A56 polish (from the 412px QA pass) ═══════════════════════════════════════════════ */

/* Portfolio hero: 5 KPIs on one line clipped the outer labels ("רווח/הפסד לא ממומש",
   "תשואה יומית"). Reflow into a 3 + 2 grid — every label and figure fully visible. */
html.is-app .ov-hero-kpis {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px !important;
    padding: 0 4px;
}
html.is-app .ov-hero-kpis .ov-kpi-card {
    grid-column: span 2;
    min-width: 0;
    padding: 9px 4px !important;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    text-align: center;
}
html.is-app .ov-hero-kpis .ov-kpi-card:nth-child(n+4) { grid-column: span 3; }
html.is-app .ov-hero-kpis .ov-kpi-card + .ov-kpi-card::before { display: none; }   /* old vertical dividers */
html.is-app .ov-hero-kpis .ov-kpi-label {
    font-size: 10.5px !important;
    letter-spacing: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
html.is-app .ov-hero-kpis .ov-kpi-value { font-size: 16px !important; white-space: nowrap; }
html.is-app.day-mode .ov-hero-kpis .ov-kpi-card {
    background: rgba(58, 50, 36, 0.04);
    border-color: rgba(58, 50, 36, 0.14);
}

/* Readability floor: badges/labels that rendered at 7–8.5px are bumped to ≥9.5px. */
html.is-app .qw-change { font-size: 9.5px !important; }
html.is-app .sentiment-sub { font-size: 9.5px !important; }
html.is-app .qw-fx-label { font-size: 10px !important; }
html.is-app .dn-tab-n { font-size: 10px !important; }
html.is-app .risk-ref-label { font-size: 10px !important; }
html.is-app .alloc-price,
html.is-app .card-footer-label { font-size: 10.5px !important; }
html.is-app .mobile-nav-btn span,
html.is-app #mobileMenuLabel { font-size: 10px !important; }
html.is-app .lhe-tm-ghead { font-size: 10px !important; }

/* Touch targets. Neighbouring controls sit only ~8px apart (e.g. ערוך / מחק תיק), so hit areas must
   never overlap — buttons grow VISIBLY; the bell + TradingView pair (stacked) gets a small 4px slop. */
html.is-app .filter-btn { min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
html.is-app .gold-bell-btn,
html.is-app .tech-tv { position: relative; }
html.is-app .gold-bell-btn::after,
html.is-app .tech-tv::after {
    content: "";
    position: absolute;
    inset: -4px -6px;
}
/* The smallest ones (chart range 1M/3M/1Y/ALL, watch-star) also grow visibly. */
html.is-app .time-range-btn { min-height: 28px; padding-top: 5px; padding-bottom: 5px; }
html.is-app .rep-star { font-size: 18px; padding: 4px 6px; }
/* Portfolio header: action buttons (הפקד/ערוך/מחק/הפק דוח) and the risk badge read too small. */
html.is-app .filter-btn { font-size: 12px !important; }
html.is-app .risk-badge { font-size: 10.5px !important; padding: 3px 9px; }
html.is-app .ov-cell-sub { font-size: 10px !important; }
html.is-app .filter-btn { display: inline-flex; align-items: center; justify-content: center; line-height: 1.2; }
html.is-app .ov-curbar-label { font-size: 10.5px !important; }
/* Portfolio ✕ was 28×28 — below the 44–48px thumb-target guideline; corner position keeps it clear
   of every other control. */
html.is-app .modal-close {
    width: 40px !important;
    height: 40px !important;
    font-size: 22px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* "New app version" banner (js/app-shell.js — only for rare native-shell updates; the UI itself
   updates live). Sits just above the bottom nav. */
html.is-app .app-update-bar {
    position: fixed; left: 12px; right: 12px; bottom: 76px; z-index: 2147482000;
    display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 10px;
    background: #12202e; border: 1px solid rgba(0, 229, 255, 0.35); border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); color: #e8ecf4; font-size: 13.5px; font-weight: 700;
}
html.is-app .app-update-bar span { flex: 1; }
html.is-app .app-update-go { min-height: 36px; padding: 0 16px; border: 0; border-radius: 10px; background: #00e5ff; color: #04121a; font-weight: 800; font-family: inherit; }
html.is-app .app-update-x { width: 36px; height: 36px; border: 0; background: none; color: #94a3b8; font-size: 16px; }
/* Android: the system Back button closes the top window (js/mobile-modals.js + the init.js popstate
   handler), so the windows' ✕ buttons are hidden — Back (or swipe-down) is the single way to close.
   Still in the DOM: mobile-modals.js clicks them on Back so each window's own cleanup runs.
   iOS has no Back button and keeps them. "ביטול" text buttons and chip-remove ✕s are actions, not
   window closers, and stay. */
html.is-android .modal-close,
html.is-android .wl-close,
html.is-android .chart-info-close,
html.is-android .reco-close,
html.is-android .sidebar-close-btn,
html.is-android .rep-chart-modal-x,
html.is-android .qw-config-close,
html.is-android .pf-x,
html.is-android .pa-modal-x,
html.is-android .msheet-close,
html.is-android .mcoll-modal-x,
html.is-android .full-list-close-btn,
html.is-android .fs-mob-x { display: none !important; }
