/* ========================================
   Modern CSS Reset
   Based on Josh Comeau's CSS Reset + additional improvements
   ======================================== */

/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 2. Remove default margin and padding */
* {
  margin: 0;
  padding: 0;
}

/* 3. Improve media defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* 4. Remove built-in form typography styles */
input, button, textarea, select {
  font: inherit;
}

/* 5. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* 6. Reset heading font sizes and weights */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

/* 7. Create a root stacking context */
#root, #__next {
  isolation: isolate;
}

/* 8. Remove list styles */
ul, ol {
  list-style: none;
}

/* 9. Reset anchor styles */
a {
  text-decoration: none;
  color: inherit;
}

/* 10. Remove button styles */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* 11. Improve line wrapping */
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 12. Improve table defaults */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 13. Remove default fieldset styles */
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

/* 14. Reset legend styles */
legend {
  padding: 0;
}

/* 15. Remove textarea resize handle (add back if needed) */
textarea {
  resize: vertical;
}

/* 16. Fix iOS input zoom */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
textarea,
select {
  font-size: 16px;
}

/* 17. Remove search input styles */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

/* 18. Remove number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* 19. Fix hidden attribute */
[hidden] {
  display: none !important;
}

/* 20. Accessibility - prefers-reduced-motion */
@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;
  }
}