/*
    Mobile/Web base layer — page-level resets, body styles (text-selection
    suppression typical of mobile apps), input rules, plus a few dark-mode
    overrides for components that don't have their own scoped CSS file
    (onboarding, leaflet maps).

    Design tokens (color/shadow/radius CSS variables) live in css/theme.css
    so WebAdmin can pull them in without inheriting these mobile-specific
    rules. app.css imports both — theme.css first so variables are defined
    before any rule references them.
*/

/* ====== RESET ====== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Kill the mobile tap-flash on every element. */
    -webkit-tap-highlight-color: transparent;
}

/* Suppress the browser's default focus ring app-wide. Its `outline: auto`
   follows the element's text color, so it rendered as an ugly WHITE box on
   white-text controls (primary buttons, active tabs) and popped up "here and
   there" whenever Blazor re-renders retained focus. We provide our own focus
   affordances instead (e.g. the blue border on focused inputs). */
:focus,
:focus-visible {
    outline: none;
}

body {
    -webkit-user-select: none;
    user-select: none;
    cursor: default;
}

input:not([type='range']):not([type='button']):not([type='submit']):not([type='reset']):not([type='checkbox']):not(
        [type='radio']
    ),
textarea,
[contenteditable] {
    -webkit-user-select: text;
    user-select: text;
    cursor: text;
}

input[type='range'] {
    cursor: pointer;
}

/* ====== ONBOARDING DARK MODE OVERRIDES ====== */
[data-theme='dark'] .onboarding {
    background: linear-gradient(160deg, #060a10 0%, #0a1628 40%, #0e1f3a 70%, #122a4a 100%) !important;
}

[data-theme='dark'] .ob-icon {
    background: rgba(91, 159, 230, 0.18) !important;
    box-shadow:
        0 0 12px rgba(91, 159, 230, 0.2),
        0 0 24px rgba(91, 159, 230, 0.15),
        0 0 48px rgba(91, 159, 230, 0.1),
        0 0 96px rgba(91, 159, 230, 0.06) !important;
    border: 1px solid rgba(91, 159, 230, 0.25) !important;
}

[data-theme='dark'] .ob-feat {
    background: rgba(91, 159, 230, 0.1) !important;
    border-color: rgba(91, 159, 230, 0.18) !important;
}

[data-theme='dark'] .ob-feat-icon {
    background: rgba(91, 159, 230, 0.2) !important;
}

/* In dark mode the white CTA becomes the app's own primary button, from the theme
   tokens, so it matches every other primary instead of a hand-mixed diagonal blue. */
[data-theme='dark'] .ob-cta {
    background: var(--btn-fill-primary) !important;
    color: #fff !important;
    box-shadow: var(--btn-shadow-primary-rest) !important;
}

/* Tile "seam" hairlines under the app's display-scale are fixed by rendering
   the map at native scale via `zoom: var(--app-unzoom)` on the map container
   (see .map-container in Posting.razor.css; boot-scale.js writes the variable),
   NOT by touching tiles here.
   Do NOT add a tile resize/`transform` rule: resizing tiles to overlap paints a
   bright line at every boundary, and a `transform: scale()` is silently dead
   (Leaflet sets an inline `transform: translate3d()` on each tile).

   The map's layering and dark mode are css/map.css, shared with Admin and Agent. */
