/**
 * 2025 HotWebDesign - Christos A. Daggas
 *
 * NOTICE OF LICENSE
 *
 * This source file is part of the Accessibility Prestashop module.
 * It is licensed under the End-User License Agreement (EULA)
 * bundled with this package in the file LICENSE.md.
 *
 * @author    Christos A. Daggas <info@hotwebdesign.gr>
 * @copyright 2025 HotWebDesign
 * @license   Proprietary - See LICENSE.md for details
 */

#dx-accessibility-toolbar {
  position: fixed;
  bottom: 10px;
  z-index: 9999;
  width: 80px;
}

#dx-accessibility-toggle {
  background: #222222;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

#dx-accessibility-toggle:hover {
  transform: scale(1.1);
}

#dx-accessibility-toggle svg {
  width: 36px;
  height: 36px;
}

#dx-accessibility-panel {
  position: absolute;
  bottom: 80px;
  width: 320px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  display: none;
}

#dx-accessibility-panel[hidden] {
  display: none;
}

#dx-accessibility-panel:not([hidden]) {
  display: block;
}

.dx-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background-color: #222222;
  border-bottom: 1px solid #222222;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

h2.dx-panel-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  margin-bottom: 0;
}

.dx-panel-close-btn {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #ffffff;
  opacity: 0.9;
  padding: 8px;
  margin: 0;
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.dx-panel-close-btn:hover {
  opacity: 1;
}

.dx-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
}

.dx-panel-button {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px 10px;
  min-height: 48px;
  min-width: 48px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
  font-size: 12px;
  color: #495057;
}

.dx-panel-button:hover {
  background-color: #e9ecef;
  border-color: #dee2e6;
}

.dx-panel-button.active {
  background-color: #cfe2ff;
  border-color: #b6d4fe;
  color: #084298;
}

.dx-panel-button svg {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  color: #6c757d;
}

.dx-panel-button.active svg {
  color: #084298;
}

.dx-compact-panel .dx-panel-button svg {
  display: none;
}

.dx-compact-panel .dx-panel-button {
  padding: 12px 8px;
  min-height: 48px;
  font-size: 13px;
}

.dx-panel-footer {
  padding: 16px;
  border-top: 1px solid #eeeeee;
}

.dx-reset-button {
  width: 100%;
  background-color: #222222;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px;
  min-height: 48px;
  box-sizing: border-box;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dx-reset-button svg {
  width: 20px;
  height: 20px;
}

/* Accessibility mode styles */
body.dx-theme-dark {
  background-color: #121212 !important;
  color: #ffffff !important;
}

body.dx-theme-dark a {
  color: #bb86fc !important;
}

body.dx-theme-dark * {
  background-color: inherit !important;
  color: inherit !important;
  border-color: #bb86fc !important;
}

body.dx-adjust-spacing * {
  line-height: 1.8 !important;
  letter-spacing: 0.1em !important;
}

body.dx-reduce-motion * {
  animation: none !important;
  transition: none !important;
}

body.dx-font-dyslexia,
body.dx-font-dyslexia * {
  font-family: "Comic Sans MS", "Chalkboard SE", "Comic Neue", sans-serif !important;
}

body.dx-links-underline a {
  text-decoration: underline !important;
}

body.dx-links-underline *:focus {
  outline: 2px solid #005fcc !important;
  outline-offset: 2px !important;
}

#dx-reading-line {
  position: fixed;
  left: 0;
  width: 100%;
  height: 10px;
  background-color: rgba(0, 95, 204, 0.7);
  z-index: 10001;
  pointer-events: none;
  transform: translateY(-50%);
  display: none;
}

body.dx-big-cursor * {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path fill="black" d="M2,2 L2,26 L10,18 L16,28 L20,26 L14,16 L24,16 Z"></path><path fill="white" d="M3,3 L3,24 L10,17 L15,26 L18,24 L13,15 L22,15 Z"></path></svg>')
      0 0,
    auto !important;
}

body.dx-hide-images img,
body.dx-hide-images video,
body.dx-hide-images picture,
body.dx-hide-images [style*="background-image"],
body.dx-hide-images svg:not(.dx-accessibility-toolbar svg) {
  visibility: hidden !important;
}

html.dx-grayscale {
  filter: grayscale(100%);
}

html.dx-grayscale #dx-accessibility-toolbar {
  filter: grayscale(0%);
}

/* Positioning */
.dx-position-bottom-right {
  right: 10px;
}

.dx-position-bottom-right .dx-accessibility-panel {
  right: 0;
}

.dx-position-bottom-left {
  left: 10px;
}

.dx-position-bottom-left .dx-accessibility-panel {
  left: 0;
}

/* Skip links */
.dx-skip-link {
  position: absolute;
  top: -60px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 12px 16px;
  min-height: 48px;
  min-width: 48px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  z-index: 10000;
  transition: top 0.3s;
}

.dx-skip-link:focus {
  top: 0;
}
