/* 고대비 모드 전용 스타일 오버라이드 */
/* 이 파일은 고대비 모드에서만 로드됩니다 */

/* 고대비 모드 감지 및 최고 우선순위 스타일 */
@media (prefers-contrast: high) {
  /* 모든 요소의 강제 색상 조정 비활성화 */
  * {
    forced-color-adjust: none !important;
    -ms-high-contrast-adjust: none !important;
  }
  
  /* 최상위 컨테이너 강제 설정 */
  html {
    background: white !important;
    color: black !important;
    color-scheme: light !important;
  }
  
  body {
    background: white !important;
    color: black !important;
    background-color: white !important;
  }
  
  /* 모든 텍스트 요소 */
  h1, h2, h3, h4, h5, h6, p, span, div, a, label {
    color: black !important;
  }
  
  /* 모든 배경 요소 */
  div, section, article, main, header, footer, nav, aside {
    background-color: white !important;
    color: black !important;
  }
  
  /* 카드 및 컨테이너 */
  .card, .container, .wrapper {
    background: white !important;
    color: black !important;
    border: 2px solid black !important;
  }
  
  /* 버튼 스타일 강제 */
  button, [role="button"], .btn, input[type="button"], input[type="submit"] {
    background: white !important;
    color: black !important;
    border: 2px solid black !important;
    cursor: pointer !important;
    opacity: 1 !important;
  }
  
  button:hover, [role="button"]:hover {
    background: black !important;
    color: white !important;
  }
  
  button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
  }
  
  /* 모달 및 다이얼로그 */
  [role="dialog"], .modal, .dialog {
    background: white !important;
    color: black !important;
    border: 3px solid black !important;
  }
  
  /* 오버레이 */
  .overlay, [data-overlay] {
    background: rgba(0, 0, 0, 0.5) !important;
  }
  
  /* 입력 필드 */
  input, textarea, select {
    background: white !important;
    color: black !important;
    border: 2px solid black !important;
  }
  
  /* 링크 */
  a {
    color: blue !important;
    text-decoration: underline !important;
  }
  
  a:visited {
    color: purple !important;
  }
  
  /* 이미지 및 미디어 */
  img, video, canvas {
    border: 1px solid black !important;
  }
  
  /* 포커스 표시 강화 */
  *:focus {
    outline: 3px solid black !important;
    outline-offset: 2px !important;
  }
  
  /* 스크롤바 */
  ::-webkit-scrollbar {
    background: white !important;
  }
  
  ::-webkit-scrollbar-thumb {
    background: black !important;
    border: 1px solid white !important;
  }
  
  /* 선택 영역 */
  ::selection {
    background: black !important;
    color: white !important;
  }
  
  /* 체크박스 및 라디오 버튼 */
  input[type="checkbox"], input[type="radio"] {
    border: 2px solid black !important;
    background: white !important;
  }
  
  /* 토글 및 스위치 */
  .toggle, .switch {
    background: white !important;
    border: 2px solid black !important;
  }
  
  /* 드롭다운 */
  .dropdown, .select-content {
    background: white !important;
    color: black !important;
    border: 2px solid black !important;
  }
  
  /* 툴팁 */
  .tooltip, [role="tooltip"] {
    background: black !important;
    color: white !important;
    border: 1px solid white !important;
  }
  
  /* 프로그레스바 */
  .progress, progress {
    background: white !important;
    border: 1px solid black !important;
  }
  
  .progress-bar, progress::-webkit-progress-bar {
    background: black !important;
  }
  
  /* 테이블 */
  table {
    border: 2px solid black !important;
  }
  
  th, td {
    border: 1px solid black !important;
    background: white !important;
    color: black !important;
  }
  
  /* 네비게이션 */
  nav, .nav, .navbar {
    background: white !important;
    color: black !important;
    border-bottom: 2px solid black !important;
  }
  
  /* 사이드바 */
  .sidebar, aside {
    background: white !important;
    color: black !important;
    border: 2px solid black !important;
  }
  
  /* 페이지네이션 */
  .pagination {
    background: white !important;
    color: black !important;
  }
  
  /* 브래드크럼 */
  .breadcrumb {
    background: white !important;
    color: black !important;
  }
  
  /* 탭 */
  .tab, .tabs {
    background: white !important;
    color: black !important;
    border: 1px solid black !important;
  }
  
  /* 아코디언 */
  .accordion {
    background: white !important;
    color: black !important;
    border: 1px solid black !important;
  }
  
  /* 알림 */
  .alert, .notification {
    background: white !important;
    color: black !important;
    border: 2px solid black !important;
  }
  
  /* 배지 */
  .badge {
    background: black !important;
    color: white !important;
    border: 1px solid white !important;
  }
  
  /* 스피너 */
  .spinner, .loader {
    border: 2px solid black !important;
    border-top: 2px solid transparent !important;
  }
}

/* Windows 고대비 모드 전용 */
@media (-ms-high-contrast: active) {
  * {
    forced-color-adjust: none !important;
  }
  
  html, body {
    background: Window !important;
    color: WindowText !important;
  }
  
  button {
    background: ButtonFace !important;
    color: ButtonText !important;
    border: 1px solid ButtonText !important;
  }
  
  a {
    color: -ms-hotlight !important;
  }
  
  input, textarea, select {
    background: Window !important;
    color: WindowText !important;
    border: 1px solid WindowText !important;
  }
}

/* 고대비 모드 미지원 브라우저 대응 */
@supports not (forced-color-adjust: none) {
  /* 강제 색상 스타일 폴백 */
  html {
    background: white !important;
    color: black !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  button {
    background: white !important;
    color: black !important;
    border: 2px solid black !important;
  }
}