/**
 * ACCESSIBILITY STYLES
 * Standardized across all pages
 * Best Coding Bootcamps 2026
 */

/* ============================================
   SKIP LINK
   ============================================ */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 10000;
  font-weight: 600;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #4A90E2;
  outline-offset: 2px;
}

/* ============================================
   VISUALLY HIDDEN (SCREEN READER ONLY)
   ============================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   FOCUS INDICATORS
   ============================================ */
*:focus {
  outline: 2px solid #4A90E2;
  outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #4A90E2;
  outline-offset: 2px;
}

/* ============================================
   BUTTON RESET FOR SEMANTIC BUTTONS
   ============================================ */
button.toggle-button,
button.review-header {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

button.toggle-button:hover,
button.review-header:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* ============================================
   CLOSE BUTTON STYLES
   ============================================ */
.close-button,
.modal-close,
.close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  color: inherit;
  min-width: 44px;
  min-height: 44px;
}

.close-button:hover,
.modal-close:hover,
.close-btn:hover {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

/* ============================================
   RANGE INPUT ENHANCEMENTS
   ============================================ */
input[type="range"] {
  min-height: 44px; /* Touch target size */
}

/* ============================================
   MODAL FOCUS TRAP
   ============================================ */
.modal[hidden] {
  display: none;
}

.modal:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
}

/* ============================================
   HIGH CONTRAST MODE SUPPORT
   ============================================ */
@media (prefers-contrast: high) {
  *:focus {
    outline: 3px solid currentColor;
    outline-offset: 3px;
  }
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
