/**
 * Modern Accessible CSS Reset for Uncutbee
 * Built for zero layout shifts, clean tap targets, and full WCAG 2.2 accessibility.
 */

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: var(--ub-line-height-normal, 1.6);
  font-family: var(--ub-font-family-sans, system-ui, -apple-system, sans-serif);
  font-size: var(--ub-font-size-base, 1rem);
  color: var(--ub-color-text-primary, #0f172a);
  background-color: var(--ub-color-canvas, #fdfbf7);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* Form Controls & Inherited Typography */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

/* Remove list styles on role="list" or styled components */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Avoid text overflow on small viewports */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Universal Visible Focus Ring for Accessibility */
:focus-visible {
  outline: 3px solid var(--ub-color-focus-ring, #e11d48) !important;
  outline-offset: 2px !important;
  border-radius: var(--ub-radius-xs, 4px);
}

/* Remove default focus when clicked via mouse if focus-visible is supported */
:focus:not(:focus-visible) {
  outline: none;
}

/* Table elements reset */
table {
  border-collapse: collapse;
  width: 100%;
}

/* Anchor tag reset */
a {
  color: var(--ub-color-primary, #e11d48);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--ub-transition-fast, 150ms ease), text-decoration-color var(--ub-transition-fast, 150ms ease);
}

a:hover {
  color: var(--ub-color-primary-hover, #be123c);
  text-decoration-thickness: 2px;
}

/* Tap target standards (WCAG 2.2 target size requirement: minimum 44px on interactive controls) */
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.ub-btn,
.ub-nav-link {
  min-height: 44px;
  touch-action: manipulation;
}
