/* ==========================================================================
   ADA & WCAG 2.1 Accessibility Module (장애인 웹 접근성 모듈)
   Newport Beach Korean Festival 2026
   ========================================================================== */

/* Skip to main content link for keyboard users */
.skip-to-content {
  position: fixed;
  top: -100px;
  left: 20px;
  background: #0b2545;
  color: #ffd166 !important;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  z-index: 100000;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: top 0.25s ease;
  text-decoration: underline;
}

.skip-to-content:focus {
  top: 0;
  outline: 3px solid #ffd166;
}

/* Floating Accessibility Button */
.accessibility-trigger-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 99990;
  background: #0b2545;
  color: #ffffff;
  border: 2px solid #ffd166;
  border-radius: 50px;
  width: 48px;
  height: 48px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 22px rgba(11, 37, 69, 0.45);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  white-space: nowrap;
}

.accessibility-trigger-btn:hover,
.accessibility-trigger-btn:focus-visible {
  width: auto;
  padding: 0 16px 0 13px;
  background: #13293d;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(11, 37, 69, 0.6);
}

.accessibility-trigger-btn:focus-visible {
  outline: 3px solid #0096c7;
  outline-offset: 3px;
}

.accessibility-icon-svg {
  width: 24px;
  height: 24px;
  fill: #ffd166;
  flex-shrink: 0;
}

.accessibility-btn-text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 0.3s ease, opacity 0.25s ease, margin 0.25s ease;
  margin-left: 0;
}

.accessibility-trigger-btn:hover .accessibility-btn-text,
.accessibility-trigger-btn:focus-visible .accessibility-btn-text {
  max-width: 140px;
  opacity: 1;
  margin-left: 8px;
}

@media (max-width: 767.98px) {
  .accessibility-trigger-btn {
    bottom: 18px;
    left: 16px;
    width: 44px;
    height: 44px;
    padding: 0 !important;
  }
  .accessibility-trigger-btn:hover,
  .accessibility-trigger-btn:focus-visible {
    width: 44px !important;
    padding: 0 !important;
  }
  .accessibility-btn-text {
    display: none !important;
  }
  .accessibility-drawer {
    max-width: 100%;
    left: -100%;
  }
}

/* Accessibility Modal Overlay & Drawer */
.accessibility-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 37, 69, 0.65);
  backdrop-filter: blur(5px);
  z-index: 99995;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.accessibility-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.accessibility-drawer {
  position: fixed;
  top: 0;
  left: -440px;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: #ffffff;
  box-shadow: 8px 0 35px rgba(0, 0, 0, 0.25);
  z-index: 99998;
  display: flex;
  flex-direction: column;
  transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Montserrat', 'Noto Sans KR', sans-serif;
}

.accessibility-drawer.active {
  left: 0;
}

/* Drawer Header */
.accessibility-drawer-header {
  background: #0b2545;
  color: #ffffff;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #ffd166;
}

.accessibility-drawer-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.02em;
}

.accessibility-drawer-title .accessibility-icon-svg {
  width: 22px;
  height: 22px;
}

.accessibility-drawer-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s;
}

.accessibility-drawer-close:hover {
  background: #d90429;
}

/* Drawer Body */
.accessibility-drawer-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.accessibility-section-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  margin-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
}

/* Grid of Toggle Buttons */
.accessibility-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.accessibility-tool-btn {
  background: #f8f9fa;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.accessibility-tool-btn:hover {
  border-color: #0096c7;
  background: #eef8fc;
  transform: translateY(-2px);
}

.accessibility-tool-btn.active {
  background: #0b2545;
  border-color: #0b2545;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(11, 37, 69, 0.25);
}

.accessibility-tool-btn.active .tool-icon {
  color: #ffd166;
}

.accessibility-tool-btn .tool-icon {
  font-size: 20px;
  margin-bottom: 6px;
  color: #0b2545;
}

.accessibility-tool-btn .tool-label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

/* Text Size Stepper */
.accessibility-font-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8f9fa;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 14px;
  margin-bottom: 24px;
}

.stepper-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  width: 38px;
  height: 38px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  color: #0b2545;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.stepper-btn:hover {
  background: #0b2545;
  color: #ffffff;
}

.stepper-status {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

/* Drawer Footer */
.accessibility-drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-reset-accessibility {
  background: #e2e8f0;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}

.btn-reset-accessibility:hover {
  background: #d90429;
  color: #ffffff;
}

/* ==========================================================================
   ACCESSIBILITY ACTIVE STATES (Applied to <body>)
   ========================================================================== */

/* 1. Large Text Modes */
body.acc-font-lg {
  font-size: 18px !important;
}
body.acc-font-lg p,
body.acc-font-lg li,
body.acc-font-lg a,
body.acc-font-lg span,
body.acc-font-lg input {
  font-size: 1.15em !important;
}

body.acc-font-xl {
  font-size: 21px !important;
}
body.acc-font-xl p,
body.acc-font-xl li,
body.acc-font-xl a,
body.acc-font-xl span,
body.acc-font-xl input {
  font-size: 1.3em !important;
}

/* 2. High Contrast - Dark */
body.acc-contrast-dark {
  background-color: #000000 !important;
  color: #ffff00 !important;
}
body.acc-contrast-dark * {
  background-color: #000000 !important;
  color: #ffff00 !important;
  border-color: #ffff00 !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
body.acc-contrast-dark a {
  color: #00ffff !important;
  text-decoration: underline !important;
}
body.acc-contrast-dark img {
  filter: contrast(140%) !important;
}

/* 3. High Contrast - Light */
body.acc-contrast-light {
  background-color: #ffffff !important;
  color: #000000 !important;
}
body.acc-contrast-light * {
  background-color: #ffffff !important;
  color: #000000 !important;
  border-color: #000000 !important;
}
body.acc-contrast-light a {
  color: #0000ff !important;
  text-decoration: underline !important;
  font-weight: 700 !important;
}

/* 4. Grayscale Mode */
body.acc-grayscale {
  filter: grayscale(100%) !important;
}

/* 5. Highlight Links */
body.acc-highlight-links a {
  background-color: #ffeb3b !important;
  color: #000000 !important;
  text-decoration: underline !important;
  font-weight: 700 !important;
  outline: 2px solid #000000 !important;
}

/* 6. Dyslexia / Legible Font */
body.acc-dyslexic,
body.acc-dyslexic * {
  font-family: Arial, Helvetica, Verdana, sans-serif !important;
  letter-spacing: 0.08em !important;
  word-spacing: 0.16em !important;
  line-height: 1.8 !important;
}

/* 7. Stop Animations */
body.acc-pause-animations,
body.acc-pause-animations * {
  animation: none !important;
  transition: none !important;
}

/* 8. Big Cursor */
body.acc-big-cursor,
body.acc-big-cursor * {
  cursor: default !important;
}
body.acc-big-cursor a,
body.acc-big-cursor button,
body.acc-big-cursor [role="button"] {
  cursor: pointer !important;
}

/* 9. Reading Guide Bar */
#accessibilityReadingGuide {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  height: 4px;
  background: #d90429;
  box-shadow: 0 0 10px rgba(217, 4, 41, 0.8);
  pointer-events: none;
  z-index: 100000;
}
body.acc-reading-guide #accessibilityReadingGuide {
  display: block;
}

/* Keyboard Enhanced Focus Outline */
:focus-visible {
  outline: 3px solid #0096c7 !important;
  outline-offset: 3px !important;
}
