/*
 * reset.css
 * Biharibuilder Design System — Modern CSS Reset
 * Version: 1.0
 *
 * Based on modern best practices. Preserves accessibility and semantics.
 */

/* Box sizing — universal */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Root */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 100%; /* 16px base */
  height: 100%;
}

/* Body */
body {
  min-height: 100vh;
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Typography resets */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: var(--leading-tight);
}

p {
  overflow-wrap: break-word;
}

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

/* Lists */
ul, ol {
  list-style: none;
}

/* Media */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
  border-style: none;
}

/* Form elements — inherit font from parent */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

/* Remove default button styles */
button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Textarea */
textarea {
  resize: vertical;
}

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

/* HR */
hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 0;
}

/* Fieldset */
fieldset {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

legend {
  padding: 0;
}

/* Details & Summary */
details {
  display: block;
}

summary {
  display: list-item;
  cursor: pointer;
}

/* Abbr */
abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

/* Mark */
mark {
  background: var(--color-copper);
  color: var(--color-white);
  border-radius: 2px;
  padding: 0 3px;
}

/* Code */
code, kbd, samp, pre {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
  font-size: 0.9em;
}

/* Pre */
pre {
  overflow: auto;
}

/* Hidden attribute */
[hidden] {
  display: none !important;
}

/* Disabled state */
[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Remove animations for users who prefer 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;
  }
}

/* Custom selection */
::selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}

::-moz-selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}

/* Scrollbar — desktop only, copper accent */
@media (min-width: 768px) {
  ::-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(--radius-round);
  }

  ::-webkit-scrollbar-thumb:hover {
    background: var(--color-copper-dark);
  }
}
