/* ==========================================================================
   WCAG 2.1 AA Accessibility Styles
   ========================================================================== */

/* --- Skip Navigation Link --- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 100000;
  background: #0072BD;
  color: #fff;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
}

  .skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    overflow: visible;
    z-index: 100000;
  }


/* --- Focus Visible Indicators (WCAG 2.4.7) --- */
*:focus-visible {
  outline: 2px solid #0072BD;
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #0072BD;
  outline-offset: 2px;
}

/* Override any outline:none that suppresses focus */
.t-button:focus-visible,
button.t-button:focus-visible,
a.t-button:focus-visible {
  outline: 2px solid #0072BD;
  outline-offset: 2px;
}


/* --- Accessibility Widget --- */
.a11y-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.a11y-toggle-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #0072BD;
  color: #fff;
  border: 2px solid #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background-color 0.2s, transform 0.2s;
  padding: 0;
}

  .a11y-toggle-btn:hover,
  .a11y-toggle-btn:focus-visible {
    background-color: #005a96;
    transform: scale(1.1);
  }

  .a11y-toggle-btn svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
  }

.a11y-panel {
  display: none;
  position: absolute;
  bottom: 58px;
  right: 0;
  width: 280px;
  background: #fff;
  border: 2px solid #0072BD;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  padding: 0;
  overflow: hidden;
}

  .a11y-panel.open {
    display: block;
  }

.a11y-panel-header {
  background-color: #0072BD;
  color: #fff;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

  .a11y-panel-header svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    margin-right: 8px;
    vertical-align: middle;
  }

.a11y-panel-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
}

  .a11y-panel-close:hover,
  .a11y-panel-close:focus-visible {
    background-color: rgba(255,255,255,0.2);
    border-radius: 4px;
  }

.a11y-panel-body {
  padding: 8px 0;
}

.a11y-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
  color: #333;
}

  .a11y-option:last-child {
    border-bottom: none;
  }

.a11y-option-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

  .a11y-option-label i {
    width: 20px;
    text-align: center;
    color: #0072BD;
  }

/* Toggle Switch */
.a11y-switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

  .a11y-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
  }

.a11y-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 22px;
}

  .a11y-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
  }

  .a11y-switch input:checked + .a11y-slider {
    background-color: #0072BD;
  }

  .a11y-switch input:focus-visible + .a11y-slider {
    box-shadow: 0 0 0 2px #0072BD;
  }

  .a11y-switch input:checked + .a11y-slider:before {
    transform: translateX(18px);
  }

.a11y-panel-footer {
  padding: 8px 16px;
  border-top: 1px solid #eee;
  text-align: center;
}

.a11y-reset-btn {
  background: none;
  border: 1px solid #0072BD;
  color: #0072BD;
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
}

  .a11y-reset-btn:hover,
  .a11y-reset-btn:focus-visible {
    background-color: #0072BD;
    color: #fff;
  }

.a11y-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: bold;
  background: #0072BD;
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
}


/* ==========================================================================
   Toggleable Accessibility Modes
   ========================================================================== */

/* --- High Contrast Mode --- */
body.a11y-high-contrast {
  background-color: #000 !important;
  color: #fff !important;
}

  body.a11y-high-contrast .page {
    background-color: #000 !important;
  }

  body.a11y-high-contrast .header {
    background-color: #111 !important;
    color: #fff !important;
    border-bottom: 2px solid #fff !important;
  }

  body.a11y-high-contrast .header-title,
  body.a11y-high-contrast .header-sub-title,
  body.a11y-high-contrast .header-title-phone,
  body.a11y-high-contrast .header-title-address {
    color: #fff !important;
  }

  body.a11y-high-contrast a {
    color: #ffff00 !important;
  }

    body.a11y-high-contrast a:visited {
      color: #ffcc00 !important;
    }

  body.a11y-high-contrast .header-links {
    background-color: #222 !important;
  }

  body.a11y-high-contrast button,
  body.a11y-high-contrast .button-1,
  body.a11y-high-contrast .button-2,
  body.a11y-high-contrast .button-3,
  body.a11y-high-contrast .button-4,
  body.a11y-high-contrast .button-5,
  body.a11y-high-contrast .t-button {
    background-color: #333 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
  }

    body.a11y-high-contrast button:hover,
    body.a11y-high-contrast button:focus-visible {
      background-color: #555 !important;
    }

  body.a11y-high-contrast .product-grid-title {
    background-color: #222 !important;
    color: #fff !important;
  }

  body.a11y-high-contrast .category-header {
    color: #fff !important;
  }

  body.a11y-high-contrast footer {
    background-color: #111 !important;
    color: #ccc !important;
  }

  body.a11y-high-contrast .footer-disclaimer,
  body.a11y-high-contrast .footer-poweredby {
    color: #ccc !important;
  }

  body.a11y-high-contrast input,
  body.a11y-high-contrast select,
  body.a11y-high-contrast textarea {
    background-color: #222 !important;
    color: #fff !important;
    border: 1px solid #fff !important;
  }

  body.a11y-high-contrast .login-box {
    background-color: #111 !important;
    border: 2px solid #fff !important;
  }

  body.a11y-high-contrast .display-label {
    color: #fff !important;
  }

  body.a11y-high-contrast table,
  body.a11y-high-contrast th,
  body.a11y-high-contrast td {
    border-color: #555 !important;
    color: #fff !important;
  }

  body.a11y-high-contrast .item-box,
  body.a11y-high-contrast .product-item {
    background-color: #111 !important;
    border-color: #fff !important;
    color: #fff !important;
  }

  /* Widget styling in high contrast */
  body.a11y-high-contrast .a11y-panel {
    background: #111;
    border-color: #fff;
  }

  body.a11y-high-contrast .a11y-option {
    color: #fff;
    border-bottom-color: #444;
  }

  body.a11y-high-contrast .a11y-reset-btn {
    border-color: #fff;
    color: #fff;
  }


/* --- Large Text Mode (WCAG 1.4.4) --- */
body.a11y-large-text {
  font-size: medium !important;
}

  body.a11y-large-text .header-title {
    font-size: 1.6em !important;
  }

  body.a11y-large-text .header-sub-title {
    font-size: 1.2em !important;
  }

  body.a11y-large-text .header-title-phone,
  body.a11y-large-text .header-title-address {
    font-size: 1.1em !important;
  }

  body.a11y-large-text button,
  body.a11y-large-text .button-1,
  body.a11y-large-text .button-2,
  body.a11y-large-text .button-3,
  body.a11y-large-text .button-4,
  body.a11y-large-text .button-5,
  body.a11y-large-text .t-button {
    font-size: 1.1em !important;
    padding: 8px 14px !important;
  }

  body.a11y-large-text .display-label,
  body.a11y-large-text td,
  body.a11y-large-text th {
    font-size: 1.05em !important;
  }

  body.a11y-large-text input,
  body.a11y-large-text select,
  body.a11y-large-text textarea {
    font-size: 1.05em !important;
    padding: 6px !important;
  }

  body.a11y-large-text .footer-poweredby,
  body.a11y-large-text .footer-disclaimer {
    font-size: 1em !important;
  }

  body.a11y-large-text .category-header {
    font-size: 1.3em !important;
  }

  body.a11y-large-text .product-grid-title {
    font-size: 1.2em !important;
  }

  body.a11y-large-text .bar-notification {
    font-size: 1.3em !important;
  }


/* --- Highlight Links Mode --- */
body.a11y-highlight-links a {
  text-decoration: underline !important;
  outline: 1px dashed currentColor !important;
  outline-offset: 2px !important;
}

  body.a11y-highlight-links a:focus-visible {
    outline: 2px solid #0072BD !important;
    outline-offset: 2px !important;
  }


/* --- Reading Guide / Focus Highlight --- */
body.a11y-reading-guide *:focus {
  outline: 3px solid #ff6600 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 8px rgba(255, 102, 0, 0.5) !important;
}


/* --- Increased Letter Spacing (WCAG 1.4.12) --- */
body.a11y-letter-spacing {
  letter-spacing: 0.08em !important;
  word-spacing: 0.16em !important;
}

  body.a11y-letter-spacing p,
  body.a11y-letter-spacing li,
  body.a11y-letter-spacing td,
  body.a11y-letter-spacing th,
  body.a11y-letter-spacing span,
  body.a11y-letter-spacing div,
  body.a11y-letter-spacing a,
  body.a11y-letter-spacing button,
  body.a11y-letter-spacing input,
  body.a11y-letter-spacing label {
    letter-spacing: 0.08em !important;
    word-spacing: 0.16em !important;
  }


/* --- Increased Line Height --- */
body.a11y-line-height {
  line-height: 1.8 !important;
}

  body.a11y-line-height p,
  body.a11y-line-height li,
  body.a11y-line-height td,
  body.a11y-line-height th,
  body.a11y-line-height span,
  body.a11y-line-height div {
    line-height: 1.8 !important;
  }


/* --- WCAG Compliance Badge in Footer --- */
.a11y-compliance-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin-top: 6px;
  font-size: 11px;
  color: #0072BD;
  border: 1px solid #0072BD;
  border-radius: 4px;
  text-decoration: none;
}

  .a11y-compliance-badge svg {
    width: 14px;
    height: 14px;
    fill: #0072BD;
  }

  .a11y-compliance-badge:hover {
    background-color: #0072BD;
    color: #fff;
  }

    .a11y-compliance-badge:hover svg {
      fill: #fff;
    }

  body.a11y-high-contrast .a11y-compliance-badge {
    color: #ffff00 !important;
    border-color: #ffff00 !important;
  }

    body.a11y-high-contrast .a11y-compliance-badge svg {
      fill: #ffff00 !important;
    }


/* ==========================================================================
   Cookie Consent Banner
   ========================================================================== */
.cookie-consent {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100001;
  background-color: #1a1a2e;
  color: #e0e0e0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.3);
}

  .cookie-consent.show {
    display: block;
  }

.cookie-consent-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-consent-text {
  flex: 1;
  min-width: 280px;
  font-size: 13px;
  line-height: 1.5;
}

  .cookie-consent-text h2 {
    font-size: 15px;
    font-weight: bold;
    margin: 0 0 6px 0;
    color: #fff;
  }

  .cookie-consent-text p {
    margin: 0;
    color: #ccc;
  }

  .cookie-consent-text a {
    color: #64b5f6;
    text-decoration: underline;
  }

    .cookie-consent-text a:hover {
      color: #90caf9;
    }

.cookie-consent-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  align-items: center;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 10px 22px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s, transform 0.1s;
  white-space: nowrap;
}

  .cookie-btn:active {
    transform: scale(0.97);
  }

.cookie-btn-accept {
  background-color: #299258;
  color: #fff;
}

  .cookie-btn-accept:hover,
  .cookie-btn-accept:focus-visible {
    background-color: #237a4a;
  }

.cookie-btn-reject {
  background-color: transparent;
  color: #ccc;
  border: 1px solid #555;
}

  .cookie-btn-reject:hover,
  .cookie-btn-reject:focus-visible {
    background-color: #333;
    color: #fff;
    border-color: #888;
  }

.cookie-btn-settings {
  background: none;
  color: #64b5f6;
  border: none;
  text-decoration: underline;
  padding: 10px 8px;
}

  .cookie-btn-settings:hover,
  .cookie-btn-settings:focus-visible {
    color: #90caf9;
  }

/* Cookie Settings Detail Panel */
.cookie-settings-detail {
  display: none;
  padding: 12px 24px 6px 24px;
  max-width: 1400px;
  margin: 0 auto;
}

  .cookie-settings-detail.open {
    display: block;
  }

.cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #333;
  font-size: 13px;
}

  .cookie-category:last-child {
    border-bottom: none;
  }

.cookie-category-info {
  flex: 1;
}

.cookie-category-name {
  font-weight: bold;
  color: #fff;
}

.cookie-category-desc {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.cookie-category-toggle {
  flex-shrink: 0;
  margin-left: 16px;
}

.cookie-required-label {
  font-size: 11px;
  color: #888;
  font-style: italic;
}

/* High contrast support for cookie banner */
body.a11y-high-contrast .cookie-consent {
  background-color: #000 !important;
  border-top: 2px solid #fff !important;
}

  body.a11y-high-contrast .cookie-consent-text h2 {
    color: #fff !important;
  }

  body.a11y-high-contrast .cookie-consent-text p {
    color: #fff !important;
  }

  body.a11y-high-contrast .cookie-consent-text a {
    color: #ffff00 !important;
  }

  body.a11y-high-contrast .cookie-btn-accept {
    background-color: #333 !important;
    border: 2px solid #fff !important;
  }

  body.a11y-high-contrast .cookie-btn-reject {
    border-color: #fff !important;
    color: #fff !important;
  }

@media screen and (max-width: 600px) {
  .cookie-consent-inner {
    flex-direction: column;
    text-align: center;
    padding: 14px 16px;
  }

  .cookie-consent-actions {
    justify-content: center;
    width: 100%;
  }

  .cookie-btn {
    flex: 1;
    min-width: 100px;
  }
}

/* Mobile - accessibility widget adjustments */
@media screen and (max-width: 480px) {
  .a11y-widget {
    bottom: 12px;
    right: 12px;
  }

  .a11y-toggle-btn {
    width: 42px;
    height: 42px;
  }

    .a11y-toggle-btn svg {
      width: 22px;
      height: 22px;
    }

  .a11y-panel {
    position: fixed;
    bottom: 60px;
    right: 8px;
    left: 8px;
    width: auto;
  }

  .a11y-compliance-badge {
    font-size: 9px;
    padding: 3px 8px;
  }

  .cookie-consent-inner {
    padding: 12px 12px;
    gap: 12px;
  }

  .cookie-consent-text h2 {
    font-size: 14px;
  }

  .cookie-consent-text p {
    font-size: 12px;
  }

  .cookie-consent-actions {
    flex-direction: column;
    gap: 6px;
  }

  .cookie-btn {
    width: 100%;
    padding: 10px 16px;
  }

  .cookie-settings-detail {
    padding: 8px 12px 4px 12px;
  }

  .cookie-category {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .cookie-category-toggle {
    margin-left: 0;
  }

  /* Skip link - full width on mobile */
  .skip-link:focus {
    width: 100%;
    text-align: center;
    left: 0;
  }
}
