/**
 * DGA Design System - Normalize
 *
 * Custom normalize styles for DGA theme, extending standard normalize.css
 * with DGA-specific resets and base styles.
 */

/* Document
   ========================================================================== */

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

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Sections
   ========================================================================== */

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--text-md-size);
  font-weight: var(--text-md-weight-regular);
  line-height: var(--text-md-line-height);
  color: var(--text-default);
  background-color: var(--background-neutral-50);
  text-align: left;
}

main {
  display: block;
}

/* Grouping content
   ========================================================================== */

hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
  border: 0;
  border-top: 1px solid var(--border-neutral-primary);
  margin: var(--spacing-3xl) 0;
}

pre {
  font-family: var(--font-family-monospace);
  font-size: 1em;
}

/* Text-level semantics
   ========================================================================== */

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

a:hover,
a:focus {
  color: var(--link-primary-hover);
}

abbr[title] {
  border-bottom: none;
  text-decoration: underline;
  text-decoration: underline dotted;
}

b,
strong {
  font-weight: var(--text-md-weight-bold);
}

code,
kbd,
samp {
  font-family: var(--font-family-monospace);
  font-size: 1em;
}

small {
  font-size: 80%;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/* Embedded content
   ========================================================================== */

img {
  border-style: none;
  max-width: 100%;
  height: auto;
}

/* Forms
   ========================================================================== */

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

button,
input {
  overflow: visible;
}

button,
select {
  text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}

fieldset {
  padding: 0.35em 0.75em 0.625em;
  border: 1px solid var(--border-neutral-primary);
  margin: 0 var(--spacing-sm);
}

legend {
  box-sizing: border-box;
  color: inherit;
  display: table;
  max-width: 100%;
  padding: 0;
  white-space: normal;
}

progress {
  vertical-align: baseline;
}

textarea {
  overflow: auto;
  resize: vertical;
}

[type="checkbox"],
[type="radio"] {
  box-sizing: border-box;
  padding: 0;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

[type="search"] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

/* Interactive
   ========================================================================== */

details {
  display: block;
}

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

/* Misc
   ========================================================================== */

template {
  display: none;
}

[hidden] {
  display: none;
}

/* DGA-specific resets and improvements
   ========================================================================== */

/* Focus styles */
:focus {
  outline: 2px solid var(--border-primary);
  outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Focus visible for keyboard users */
:focus-visible {
  outline: 2px solid var(--border-primary);
  outline-offset: 2px;
}

/* Skip link for accessibility */
/* .skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  top: 0;
  left: 6px;
  width: auto;
  height: auto;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--background-primary);
  color: var(--text-oncolor-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  z-index: var(--z-modal);
  outline: none;
} */

/* Selection styles */
::selection {
  background-color: var(--background-primary-200);
  color: var(--text-default);
}

::-moz-selection {
  background-color: var(--background-primary-200);
  color: var(--text-default);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Improved button defaults */
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Table improvements */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

th,
td {
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--border-neutral-primary);
}

th {
  font-weight: var(--text-md-weight-semibold);
  background-color: var(--background-neutral-100);
}

/* Form improvements */
input,
textarea,
select {
  border: 1px solid var(--border-neutral-primary);
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--background-white);
  color: var(--text-default);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--border-primary);
  box-shadow: 0 0 0 3px rgba(20, 87, 58, 0.1);
}

input:disabled,
textarea:disabled,
select:disabled {
  background-color: var(--background-neutral-100);
  color: var(--text-disabled);
  cursor: not-allowed;
}

/* Placeholder styles */
::placeholder {
  color: var(--text-disabled);
  opacity: 1;
}

/* Print styles */
@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  thead {
    display: table-header-group;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}