
#a11y-button {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  z-index: 10001 !important;
  width: 54px !important;
  height: 54px !important;
  background: #000 !important;
  color: #fff !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#a11y-button i {
  font-size: 24px !important;
  color: #fff !important;
}

#a11y-panel {
  position: fixed !important;
  bottom: 80px !important;
  right: 20px !important;
  background: #fff !important;
  border: 1px solid #ccc !important;
  z-index: 10000 !important;
  padding: 15px !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
  max-width: 320px !important;
  max-height: calc(100vh - 120px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.a11y-reset-all {
  width: 100% !important;
  padding: 12px !important;
  margin-top: 15px !important;
  background: #dc3545 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: background 0.2s ease !important;
}

.a11y-reset-all:hover {
  background: #c82333 !important;
}

.a11y-reset-all i {
  font-size: 16px !important;
}

.a11y-hidden {
  display: none;
}

.a11y-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.a11y-toggle {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  font-size: 14px !important;
  padding: 10px !important;
  border: 1px solid #eee !important;
  background: #fff !important;
  cursor: pointer !important;
  border-radius: 4px !important;
  color: #000 !important;
}

.a11y-toggle i {
  font-size: 24px !important;
  margin-bottom: 4px !important;
  color: #000 !important;
}


/* Přístupnostní efekty */

body.a11y-font *:not(#a11y-panel):not(#a11y-panel *):not(#a11y-button):not(#a11y-virtual-keyboard):not(#a11y-virtual-keyboard *) {
  font-family: Arial, sans-serif !important;
  line-height: 1.6 !important;
}

.a11y-alt-text {
  display: block;
  font-size: 12px;
  color: #444;
  background: #f0f0f0;
  padding: 4px;
  border: 1px dotted #ccc;
  margin-top: 2px;
  max-width: 100%;
  word-wrap: break-word;
  font-style: italic;
}

body.a11y-links a:not(#a11y-panel a):not(#a11y-panel a *) {
  outline: 2px dashed #000;
  background-color: #ffff99;
  color: #000 !important;
}

body.a11y-headings h1:not(#a11y-panel h1):not(#a11y-panel h1 *),
body.a11y-headings h2:not(#a11y-panel h2):not(#a11y-panel h2 *),
body.a11y-headings h3:not(#a11y-panel h3):not(#a11y-panel h3 *),
body.a11y-headings h4:not(#a11y-panel h4):not(#a11y-panel h4 *),
body.a11y-headings h5:not(#a11y-panel h5):not(#a11y-panel h5 *),
body.a11y-headings h6:not(#a11y-panel h6):not(#a11y-panel h6 *) {
  text-decoration: underline;
}

body.a11y-buttons button:not(#a11y-panel button):not(#a11y-panel button *):not(#a11y-button):not(#a11y-virtual-keyboard button):not(#a11y-virtual-keyboard button *),
body.a11y-buttons input[type=submit]:not(#a11y-panel input[type=submit]) {
  padding: 1em 2em;
  font-size: 1.1em;
}

body.a11y-readmode *:not(#a11y-panel):not(#a11y-panel *):not(#a11y-button):not(#a11y-virtual-keyboard):not(#a11y-virtual-keyboard *) {
  background: #fff !important;
  color: #000 !important;
  font-size: 18px;
}

body.a11y-textzoom *:not(#a11y-panel):not(#a11y-panel *):not(#a11y-button):not(#a11y-virtual-keyboard):not(#a11y-virtual-keyboard *) {
  font-size: 120%;
}

body.a11y-zoom *:not(#a11y-panel):not(#a11y-panel *):not(#a11y-button):not(#a11y-virtual-keyboard):not(#a11y-virtual-keyboard *):hover {
  transform: scale(1.05);
  transition: transform 0.1s ease-in-out;
}

/* Kontrastní režimy */
body.a11y-contrast-dark {
  background: #000 !important;
  color: #fff !important;
}

body.a11y-contrast-dark * {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

body.a11y-contrast-dark a {
  color: #ffff00 !important;
  text-decoration: underline;
}

body.a11y-contrast-dark img {
  filter: brightness(0.8) contrast(1.2);
}

/* Výjimky pro accessibility prvky - tmavý režim */
body.a11y-contrast-dark #a11y-button {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

body.a11y-contrast-dark #a11y-panel {
  background: #fff !important;
  color: #000 !important;
}

body.a11y-contrast-dark #a11y-panel *:not(.a11y-toggle.active):not(.a11y-toggle.active *):not(.a11y-contrast-btn.active):not(.a11y-contrast-btn.active *):not(.a11y-color-btn.active):not(.a11y-color-btn.active *) {
  background-color: #fff !important;
  color: #000 !important;
  border-color: #ccc !important;
}

body.a11y-contrast-dark #a11y-virtual-keyboard {
  background: #fff !important;
  color: #000 !important;
}

body.a11y-contrast-dark #a11y-virtual-keyboard * {
  background-color: #fff !important;
  color: #000 !important;
  border-color: #333 !important;
}

body.a11y-contrast-light {
  background: #fff !important;
  color: #000 !important;
}

body.a11y-contrast-light * {
  background-color: #fff !important;
  color: #000 !important;
  border-color: #000 !important;
}

body.a11y-contrast-light a {
  color: #0000ff !important;
  text-decoration: underline;
}

body.a11y-contrast-light img {
  filter: brightness(1.1) contrast(1.3);
}

/* Výjimky pro accessibility prvky - světlý režim */
body.a11y-contrast-light #a11y-button {
  background: #000 !important;
  color: #fff !important;
  border-color: #000 !important;
}

body.a11y-contrast-light #a11y-panel {
  background: #fff !important;
  color: #000 !important;
}

body.a11y-contrast-light #a11y-panel *:not(.a11y-toggle.active):not(.a11y-toggle.active *):not(.a11y-contrast-btn.active):not(.a11y-contrast-btn.active *):not(.a11y-color-btn.active):not(.a11y-color-btn.active *) {
  background-color: #fff !important;
  color: #000 !important;
  border-color: #ccc !important;
}

body.a11y-contrast-light #a11y-virtual-keyboard {
  background: #fff !important;
  color: #000 !important;
}

body.a11y-contrast-light #a11y-virtual-keyboard * {
  background-color: #fff !important;
  color: #000 !important;
  border-color: #333 !important;
}

.a11y-toggle.active {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #000 !important;
  transition: background-color 0.2s ease !important;
}

.a11y-toggle.active i {
  color: #fff !important;
}

.a11y-toggle.active span {
  color: #fff !important;
}

/* Sekce pro vlastní barvy */
.a11y-color-section {
  margin-top: 15px !important;
  padding-top: 15px !important;
  border-top: 2px solid #eee !important;
  background: transparent !important;
}

.a11y-color-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.a11y-color-header i {
  font-size: 24px;
}

.a11y-color-header strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.a11y-color-header p {
  margin: 0;
  font-size: 11px;
  color: #666;
}

.a11y-color-buttons {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}

.a11y-color-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  border-radius: 4px;
  font-size: 13px;
  transition: all 0.2s ease;
}

.a11y-color-btn:hover {
  background: #f5f5f5;
}

.a11y-color-btn.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

.a11y-color-picker {
  margin-bottom: 10px;
}

#a11y-color-input {
  width: 100%;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}

.a11y-color-reset {
  width: 100%;
  padding: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.a11y-color-reset:hover {
  background: #f5f5f5;
}

.a11y-color-reset i {
  font-size: 12px;
}

/* Sekce pro kontrastní režimy */
.a11y-contrast-section {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 2px solid #eee;
}

.a11y-contrast-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.a11y-contrast-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  border: 2px solid #ddd;
  background: #fff;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  min-height: 80px;
}

.a11y-contrast-btn i {
  font-size: 24px;
  margin-bottom: 6px;
}

.a11y-contrast-btn span {
  font-size: 11px;
  text-align: center;
  line-height: 1.2;
}

.a11y-contrast-btn:hover {
  background: #f5f5f5;
  border-color: #999;
}

.a11y-contrast-btn.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

.a11y-contrast-btn.active i {
  color: #fff;
}

/* Sekce pro kurzor */
.a11y-cursor-section {
  margin-top: 15px !important;
  padding-top: 15px !important;
  border-top: 2px solid #eee !important;
  background: transparent !important;
}

.a11y-cursor-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.a11y-cursor-header i {
  font-size: 24px;
}

.a11y-cursor-header strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.a11y-cursor-header p {
  margin: 0;
  font-size: 11px;
  color: #666;
}

.a11y-cursor-buttons {
  display: flex;
  gap: 10px;
}

.a11y-cursor-btn {
  flex: 1;
  padding: 12px;
  border: 2px solid #ddd;
  background: #fff;
  cursor: pointer;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.a11y-cursor-btn:hover {
  background: #f5f5f5;
}

.a11y-cursor-btn.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* Kurzory - velké a barevné */
body.a11y-cursor-white,
body.a11y-cursor-white * {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M10 4 L10 36 L18 28 L24 44 L30 42 L24 26 L36 26 Z" fill="white" stroke="black" stroke-width="2"/></svg>') 4 4, auto !important;
}

body.a11y-cursor-black,
body.a11y-cursor-black * {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M10 4 L10 36 L18 28 L24 44 L30 42 L24 26 L36 26 Z" fill="black" stroke="white" stroke-width="2"/></svg>') 4 4, auto !important;
}

/* Sekce pro seřízení písma */
.a11y-text-section {
  margin-top: 15px !important;
  padding-top: 15px !important;
  border-top: 2px solid #eee !important;
  background: transparent !important;
}

.a11y-text-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.a11y-text-header i {
  font-size: 24px;
}

.a11y-text-header strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.a11y-text-header p {
  margin: 0;
  font-size: 11px;
  color: #666;
}

.a11y-text-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.a11y-text-option {
  padding: 10px 8px;
  border: 2px solid #ddd;
  background: #fff;
  cursor: pointer;
  border-radius: 4px;
  font-size: 12px;
  transition: all 0.2s ease;
}

.a11y-text-option:hover {
  background: #f5f5f5;
}

.a11y-text-option.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

.a11y-text-slider {
  display: flex;
  align-items: center;
  gap: 10px;
}

.a11y-slider-btn {
  width: 36px;
  height: 36px;
  border: 2px solid #333;
  background: #fff;
  cursor: pointer;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.a11y-slider-btn:hover {
  background: #000;
  color: #fff;
}

#a11y-text-range {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #ddd;
  outline: none;
  -webkit-appearance: none;
}

#a11y-text-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
}

#a11y-text-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
  border: none;
}

/* Virtuální klávesnice */
#a11y-virtual-keyboard {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 2px solid #000;
  border-radius: 10px;
  padding: 15px;
  z-index: 10002;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  min-width: 600px;
}

.a11y-keyboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ccc;
}

.a11y-keyboard-header span {
  font-weight: bold;
  font-size: 16px;
}

#a11y-keyboard-close {
  background: #ff0000;
  color: #fff;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

#a11y-keyboard-close:hover {
  background: #cc0000;
}

.a11y-keyboard-row {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 5px;
}

.a11y-key {
  background: #fff;
  border: 2px solid #333;
  border-radius: 5px;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  min-width: 50px;
  transition: all 0.1s ease;
}

.a11y-key:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.a11y-key:active {
  background: #000;
  color: #fff;
  transform: translateY(0);
}

.a11y-key-space {
  min-width: 300px;
}

.a11y-key-backspace {
  min-width: 80px;
}
