/* ============================================
   WashCRM — Base Reset & Typography
   ============================================ */

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background: var(--bg-gradient, var(--bg-primary));
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  transition:
    background var(--transition-theme),
    color var(--transition-theme);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Custom Scrollbar ---- */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: var(--scrollbar-width);
  height: var(--scrollbar-width);
}

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

*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--scrollbar-radius);
  transition: background var(--transition-fast);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

a:hover {
  opacity: 0.8;
}

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

img[src$=".svg"]:not(.phone-group__flag):not(.auth-card__logo-icon):not(.theme-toggle__icon):not(.social-btn__icon):not(.header__logo-icon):not([src$="wash-card-preview.svg"]):not([src$="wash-card-preview 1.svg"]):not(.payment-toggle__img):not(.wsem-payment-toggle__img) {
  filter: var(--icon-filter, none);
  transition: filter var(--transition-theme);
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

input {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
  width: 100%;
}

input::placeholder {
  color: var(--text-placeholder);
  opacity: var(--opacity-placeholder);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  transition: background-color 5000s ease-in-out 0s;
  font-size: inherit !important;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
}

h1 {
  font-size: var(--font-size-3xl);
}

h2 {
  font-size: var(--font-size-2xl);
}

h3 {
  font-size: var(--font-size-xl);
}

/* ---- Hidden attribute fix ---- */
/* CSS display (flex/grid) overrides HTML hidden attribute — this ensures hidden always works */
[hidden] {
  display: none !important;
}

/* ---- Utility ---- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-secondary {
  color: var(--text-secondary);
}

.text-accent {
  color: var(--text-link);
}
