/* ==========================================================================
   Texora IT — RESET LAYER
   Bootstrap's Reboot already normalizes most elements; this file only adds
   the extra resets Reboot doesn't cover so we never fight the framework.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Defense-in-depth against horizontal scroll: body already sets
     overflow-x:clip (base/base.css) which browsers propagate to the
     viewport when html itself is silent on the property, but declaring
     it explicitly here too avoids relying on that propagation behavior
     for elements using position:fixed (e.g. the mobile offcanvas panel,
     which sits off-screen via transform when closed).
     NOTE: this uses `clip`, not `hidden` — `overflow-x: hidden` on
     html/body turns them into scroll containers, which silently breaks
     `position: sticky` on the header in several browsers (most
     consistently Safari). `clip` blocks the same horizontal bleed
     without establishing a scroll container, so the sticky header
     keeps working. Do not change this back to `hidden`. */
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  text-decoration: none;
  background-color: transparent;
}

ul[class],
ol[class] {
  padding: 0;
  list-style: none;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

iframe {
  border: 0;
}

::selection {
  background-color: var(--nx-primary);
  color: var(--nx-primary-contrast);
}

/* Accessible, on-brand focus ring — never remove focus without replacing it */
:focus-visible {
  outline: 2px solid var(--nx-primary);
  outline-offset: 2px;
  border-radius: var(--nx-radius-xs);
}

/* Custom scrollbar (WebKit + Firefox) */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--nx-scrollbar-thumb) var(--nx-scrollbar-track);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--nx-scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--nx-scrollbar-thumb);
  border-radius: var(--nx-radius-pill);
  border: 2px solid var(--nx-scrollbar-track);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--nx-text-muted);
}
