@font-face {
  font-family: 'OpenDyslexic';
  src: url('assets/fonts/opendyslexic-regular-webfont.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

html.darkmode, html.darkmode body {
  background-color: #121212 !important;
  color: #e0e0e0 !important;
}

html.darkmode a {
  color: #90caf9 !important;
}

html.darkmode header,
html.darkmode footer,
html.darkmode main,
html.darkmode section,
html.darkmode article,
html.darkmode aside,
html.darkmode nav,
html.darkmode .wp-block-group,
html.darkmode .wp-block-cover,
html.darkmode .site,
html.darkmode .entry-content,
html.darkmode .container {
  background-color: #1e1e1e !important;
  color: #e0e0e0 !important;
  border-color: #333 !important;
}

html.darkmode .widget,
html.darkmode .wp-block-widget,
html.darkmode .wp-block-search,
html.darkmode .menu {
  background-color: #1e1e1e !important;
  color: #ccc !important;
}

html.darkmode body:not(.accessibility-widget) button:not(.accessibility-widget *),
html.darkmode body:not(.accessibility-widget) input:not(.accessibility-widget *),
html.darkmode body:not(.accessibility-widget) select:not(.accessibility-widget *),
html.darkmode body:not(.accessibility-widget) textarea:not(.accessibility-widget *) {

  background-color: #2c2c2c !important;
  color: #fff !important;
  border-color: #444 !important;
}

html.darkmode .button,
html.darkmode .btn,
html.darkmode .wp-block-button__link {
  background-color: #333 !important;
  color: #fff !important;
  border-color: #444 !important;
}

html.darkmode img,
html.darkmode video {
  opacity: 0.9;
  filter: brightness(0.9) contrast(1.05);
}

body.dyslexic-mode *:not(.accessibility-widget):not(.accessibility-widget *):not(#wcagWidgetPanel):not(#wcagWidgetPanel *):not(i):not([class*="icon"]):not([aria-hidden="true"]) {
  font-family: 'OpenDyslexic', Arial, sans-serif !important;
  letter-spacing: 0.08em !important;
  word-spacing: 0.16em !important;
  line-height: 1.7 !important;
  font-size: 1.05em !important;
}


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

body.high-contrast a,
body.high-contrast a:visited {
  color: #0ff !important;
  text-decoration: underline !important;
}

body.high-contrast button:not(.accessibility-widget *):not(#wcagWidgetPanel *),
body.high-contrast input[type="submit"]:not(.accessibility-widget *):not(#wcagWidgetPanel *),
body.high-contrast .button:not(.accessibility-widget *):not(#wcagWidgetPanel *) {

  background-color: #222 !important;
  color: #fff !important;
  border: 1px solid #fff !important;
}

body.high-contrast header,
body.high-contrast footer,
body.high-contrast section,
body.high-contrast div {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

body.high-contrast img {
  opacity: 1 !important;
  filter: none !important;
}

body.font-large p,
body.font-large li,
body.font-large h1,
body.font-large h2,
body.font-large h3,
body.font-large span,
body.font-large a {
  font-size: 110% !important;
}

body.font-xlarge p,
body.font-xlarge li,
body.font-xlarge h1,
body.font-xlarge h2,
body.font-xlarge h3,
body.font-xlarge span,
body.font-xlarge a {
  font-size: 125% !important;
}
.no-motion-wcag *, 
.no-motion-wcag *::before, 
.no-motion-wcag *::after {
  animation-duration: 0.01s !important;
  animation-delay: 0s !important;
  transition-duration: 0.01s !important;
  transition-delay: 0s !important;
  scroll-behavior: auto !important;
}

body.show-links a {
  text-decoration: underline !important;
  background-color: #fffaa6 !important;
  color: #0000cc !important;
  padding: 2px 4px;
  border-radius: 4px;
}

body.show-links a:focus {
  outline: 2px dashed #0000cc !important;
  outline-offset: 2px;
}

/* Cursor mare */
body.cursor-big {
  cursor: url('../cursors/crs4.cur'), auto !important;
}

body.cursor-focus .focus-ring {
  position: absolute;
  z-index: 99999;
  border: 3px solid #00b7ff;
  border-radius: 6px;
  pointer-events: none;
  transition: all 0.2s ease;
  box-shadow: 0 0 0 3px rgba(0,183,255,0.4);
}
.focus-ring {
  position: absolute;
  z-index: 99999;
  border: 3px solid #00b7ff;
  border-radius: 6px;
  pointer-events: none;
  transition: all 0.2s ease;
  box-shadow: 0 0 0 3px rgba(0, 183, 255, 0.4);
}
.focus-line {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 3px; /* Poți schimba grosimea */
  background: red; /* Poți personaliza culoarea */
  pointer-events: none;
  z-index: 999999;
  transition: top 0.05s ease;
}
.focus-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999999;
  background: 
    linear-gradient(to bottom,
      rgba(0, 0, 0, 0.6) 0,
      rgba(0, 0, 0, 0.6) var(--focus-top),
      rgba(0, 0, 0, 0) var(--focus-top),
      rgba(0, 0, 0, 0) calc(var(--focus-top) + var(--focus-height)),
      rgba(0, 0, 0, 0.6) calc(var(--focus-top) + var(--focus-height)),
      rgba(0, 0, 0, 0.6) 100%
    );
  transition: background 0.05s ease-out;
}

/* Stil focus clar – linie evidențiată albastră */
body.cursor-focus a:focus,
body.cursor-focus button:focus,
body.cursor-focus input:focus,
body.cursor-focus textarea:focus,
body.cursor-focus select:focus {
  outline: 4px solid #0094ff !important;
  outline-offset: 2px !important;
  border-radius: 6px;
  box-shadow: 0 0 0 3px rgba(0, 148, 255, 0.4) !important;
  transition: none !important;
}
body.cursor-focus *:focus::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 4px;
  background: #00ffae;
}
/* Ascunde complet imaginile */
body.hide-images img,
body.hide-images picture,
body.hide-images svg,
body.hide-images figure,
body.hide-images .wp-block-image,
body.hide-images [style*="background-image"] {
  display: none !important;
  visibility: hidden !important;
}
body.hide-images img::after {
  content: "Imagine ascunsă";
  display: block;
  color: #666;
  font-style: italic;
}
.follow-ring {
  position: fixed;
  width: 100px;
  height: 100px;
  pointer-events: none;
  border-radius: 50%;
  background: rgba(0, 123, 255, 0.2);
  border: 2px solid rgba(0, 123, 255, 0.6);
  z-index: 99998;
  transition: transform 0.05s linear;
  mix-blend-mode: multiply;
}

.accessibility-widget {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  width: 280px;
  font-family: 'Segoe UI', sans-serif;
}
.accessibility-widget button {
  flex: 1 1 48%;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease-in-out;
  justify-content: center;
}

.accessibility-widget button:hover {
  background: #e6e6e6;
  border-color: #bbb;
}

.accessibility-widget button:active {
  transform: scale(0.98);
}

.accessibility-widget .icon {
  font-size: 18px;
}
button:focus-visible {
  outline: 3px solid #0094ff;
  outline-offset: 2px;
  border-radius: 6px;
}
#accessibility-widget button.active {
  background-color: #0066cc !important;
  color: #fff !important;
  border: 1px solid #004080;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.2);
}
#wcagWidgetPanel {
  pointer-events: auto !important;
  z-index: 9999 !important;
  opacity: 1 !important;
}

#wcagWidgetPanel button {
  pointer-events: auto !important;
  cursor: pointer;
}
.accessibility-widget .font-group {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.accessibility-widget .font-group button {
  flex: 1 1 50%;
}
.accessibility-widget button,
.accessibility-widget select {
	 z-index: 99999;
  position: relative
  flex: 1 1 45%;
  font-size: 14px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #999;
  background: #f5f5f5;
  cursor: pointer;
}

.accessibility-widget select {
  font-size: 13px;
}
html.grayscale img,
html.grayscale picture,
html.grayscale video,
html.grayscale svg,
html.grayscale figure,
html.grayscale input[type="image"],
html.grayscale a,
html.grayscale button,
html.grayscale header,
html.grayscale footer,
html.grayscale main,
html.grayscale section,
html.grayscale div[class*="bg"],
html.grayscale .wp-block-cover,
html.grayscale .wp-block-image {
  filter: grayscale(100%) !important;
  -webkit-filter: grayscale(100%) !important;
}

#wcag-credit {
  text-align: center;
  font-size: 11px;
  margin-top: 8px;
  color: #666;
  font-style: italic;
}

#wcag-credit a {
  color: #333;
  text-decoration: none;
  font-weight: bold;
}

#wcag-credit a:hover {
  text-decoration: underline;
}
#wcagWidgetToggle {
  animation: wcagPulse 2.5s infinite;
  transition: transform 0.2s ease;
}

#wcagWidgetToggle:hover {
  transform: scale(1.1);
}

@keyframes wcagPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 148, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(0, 148, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 148, 255, 0);
  }
}
button small {
  display: block;
  font-size: 11px;
  color: #666;
  margin-top: 2px;
  font-style: italic;
  line-height: 1;
}
button .label {
  display: block;
  font-size: 15px;
  line-height: 1.3;
  font-weight: bold;
  color: #111; /* poți schimba în #000 pentru contrast maxim */
}

button .shortcut {
  display: block;
  font-size: 11px;
  color: #666;
  font-style: italic;
  line-height: 1;
  margin-top: 2px;
}
button.active {
  background-color: #00ff8e;
  color: #fff;
  border: 2px solid #000;
}

.settings-section {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.settings-section h2 {
  margin-top: 0;
  font-size: 18px;
}

input[type="text"], select {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  margin-top: 5px;
  margin-bottom: 15px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.valid-license {
  color: #1e7e34;
  font-weight: bold;
}

.invalid-license {
  color: #dc3545;
  font-weight: bold;
}
