/**
 * DealerPro Elite — Modern CSS Reset
 *
 * Minimal reset focused on cross-browser consistency without removing
 * useful defaults. Keeps the spirit of Josh Comeau's modern reset.
 *
 * @package DealerPro_Elite
 * @since 2.0.0
 */

/* Box sizing model: border-box for everything */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin/padding */
* {
  margin: 0;
  padding: 0;
}

/* Smooth scrolling unless user prefers reduced motion */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Responsive images by default */
img,
picture,
video,
canvas,
svg {
  max-width: 100%;
  display: block;
}

/* Inherit fonts on form elements */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Buttons reset to baseline — fully styled by components.css */
button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* Links inherit color/decoration by default */
a {
  color: inherit;
  text-decoration: none;
}

/* Lists without bullets/numbers by default (re-add via .list-* if needed) */
ul,
ol {
  list-style: none;
}

/* Tables: collapse borders */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* HTML `hidden` attribute MUST collapse the element. The UA stylesheet
   has `[hidden] { display: none }`, but ANY page-level rule that sets
   `display` (e.g. `.inventory-grid { display: grid }`, `.flex { display: flex }`)
   beats UA specificity and overrides — the element stays visible despite
   the `hidden` attribute, breaking JS that toggles via `el.hidden = true`.
   Promoted to `display: none !important` so the attribute wins regardless
   of which display utility the element also carries.
   Bug it fixed: saved page's `#dpel-saved-loading` (with `.inventory-grid`)
   stayed visible after JS hydration, leaving orphan skeleton cards below
   the real cards. */
[hidden] {
  display: none !important;
}

/* Reduced motion preference. The previous rule only zeroed out durations,
   which still left every `transform: translateY(-Npx)` on :hover firing
   instantly — that snap-jump can trigger vestibular reactions. Block hover
   transforms outright when user has reduced-motion set. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  *:hover,
  *:focus,
  *:focus-visible,
  *:active {
    transform: none !important;
  }
}
