/* ==========================================================================
   BASE STYLES
   Global reset and base element styles.
   Uses only variables from variables.css.
   ========================================================================== */

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

html {
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* Utility helper for screen readers only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Flash messages */
.flash {
  padding: var(--space-4) 0;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
}

.flash--success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #047857;
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.flash--error {
  background-color: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
}

/* Error page */
.error-page {
  padding: 120px 0;
  text-align: center;
}

.error-page__icon {
  font-size: 64px;
  margin-bottom: var(--space-4);
}

.error-page__title {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-3xl);
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.error-page__message {
  color: var(--color-text-muted);
  max-width: 500px;
  margin: 0 auto var(--space-6);
  line-height: 1.6;
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

.error-page__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-5);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-inverse);
  background-color: var(--color-primary);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);
}

.error-page__button:hover {
  background-color: #0022b0;
}

.error-page__button--secondary {
  color: var(--color-text);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border-dark);
}

.error-page__button--secondary:hover {
  background-color: #f8f9fa;
}
