/* Vigilis Tree Shelters – Main Stylesheet */
/* Design system stylesheets (colors, typography, layout) are enqueued separately
   via wp_enqueue_style in functions.php so they download in parallel instead of
   via the synchronous @import waterfall. vigilis-styles depends on vigilis-layout
   to preserve the cascade order this file previously got from @import. */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Default link color — primary-800 for WCAG AA contrast on light backgrounds.
   Overrides the @import from colors.css (which may be CDN-cached stale). */
a {
  color: var(--color-primary-800, #08471B);
}

/* WordPress Editor Styles */
.wp-block {
  max-width: 100%;
}

/* Gutenberg Editor Compatibility */
.block-editor__container {
  font-family: var(--font-family-base);
}

.wp-block-editor__block-list__layout {
  padding: 0;
}

/* Accessibility */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  clip: auto !important;
  clip-path: none;
  color: var(--color-text-primary);
  display: block;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  height: auto;
  left: 5px;
  line-height: var(--line-height-normal);
  padding: var(--spacing-3) var(--spacing-4);
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: var(--z-tooltip);
}

/* Skip to Main Content Link */
a.skip-link {
  position: absolute;
  top: -999px;
  left: -999px;
}

a.skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-tooltip);
  background-color: var(--color-primary-800);
  color: var(--color-neutral-white);
  padding: var(--spacing-3) var(--spacing-4);
  text-decoration: none;
  font-weight: var(--font-weight-bold);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--spacing-6) 0;
}

th,
td {
  border: 1px solid var(--color-border);
  padding: var(--spacing-3) var(--spacing-4);
  text-align: left;
}

th {
  background-color: var(--color-bg-secondary);
  font-weight: var(--font-weight-bold);
}

tr:nth-child(even) {
  background-color: var(--color-bg-secondary);
}

/* CF7: hide the hidden-fields fieldset that renders as a visible box */
fieldset.hidden-fields-container {
  display: none;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

