/* Base CSS - Core reset and foundational styles */
/* Import this first, before all other CSS files */

/* =============================================================================
   CSS RESET AND BASE STYLES  
   ============================================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.5;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background-color: var(--background-color) !important;
  color: var(--text-primary) !important;
  transition: var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Button font consistency - apply system font stack to all buttons */
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.btn {
  font-family: inherit;
}

/* =============================================================================
   SCREEN READER AND ACCESSIBILITY
   ============================================================================= */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =============================================================================
   THEME LOADING STATES
   ============================================================================= */

/* Prevent flash of unstyled content */
html:not(.theme-loaded) body {
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
}

html.theme-loaded body {
  opacity: 1;
}

.theme-transition {
  visibility: hidden;
  transition: visibility 0s linear 0.1s;
}

.theme-transition.theme-loaded {
  visibility: visible;
}
