/* accessibility-widget.css */
:root {
  --aw-gold: rgba(202, 160, 110, 0.85);
  --aw-border: rgba(202, 160, 110, 0.35);
  --aw-bg: rgba(255, 255, 255, 0.88);
  --aw-text: #2b2320;
  --aw-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.aw-skip {
  position: absolute;
  right: 12px;
  top: -60px;
  z-index: 10000;
  padding: 10px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--aw-border);
  box-shadow: var(--aw-shadow);
  color: var(--aw-text);
  text-decoration: none;
  font-weight: 800;
  transition: top 0.2s ease;
}
.aw-skip:focus {
  top: 12px;
  outline: 3px solid rgba(202, 160, 110, 0.55);
  outline-offset: 3px;
}

/* Button - Original floating circular blue button */
.aw-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999; /* High z-index for visibility */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%; /* Circular */
  border: none;
  background: #1E63D6; /* Blue background */
  cursor: pointer;
  color: #ffffff; /* White icon */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(30, 99, 214, 0.3); /* Subtle shadow */
}

/* Icon styling - supports both .aw-ico and .a11y-icon */
.aw-fab .aw-ico,
.aw-fab .a11y-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff; /* White icon */
}

.aw-fab .aw-ico svg,
.aw-fab .a11y-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  color: #ffffff; /* White icon */
}

/* Hide text, show only icon */
.aw-fab .aw-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .aw-fab {
    width: 46px;
    height: 46px;
    right: 12px;
    bottom: 12px;
    border-radius: 50%; /* Keep circular */
  }
  
  .aw-fab .aw-ico,
  .aw-fab .a11y-icon {
    width: 20px; /* 20px icon on mobile */
    height: 20px;
  }
}

.aw-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(30, 99, 214, 0.4); /* Enhanced shadow on hover */
}
.aw-fab:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.8); /* White focus outline for contrast */
  outline-offset: 3px;
  border-radius: 50%; /* Match circular button */
}

.aw-panel button:focus-visible,
.aw-panel input:focus-visible,
.aw-panel a:focus-visible {
  outline: 3px solid rgba(202, 160, 110, 0.55);
  outline-offset: 3px;
  border-radius: 12px;
}

/* Overlay + Panel */
.aw-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.aw-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.aw-panel {
  position: fixed;
  top: 0; /* Will be set dynamically by JS */
  left: 0; /* Will be set dynamically by JS */
  z-index: 10000; /* Above button */
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100vh - 120px); /* Prevent overflow */
  overflow-y: auto;
  border: 1px solid var(--aw-border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 14px;
  box-shadow: var(--aw-shadow);
  padding: 10px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  color: var(--aw-text);
  direction: rtl;
}

/* Mobile responsive for panel */
@media (max-width: 480px) {
  .aw-panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 100px);
  }
}
.aw-panel.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.aw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 6px 10px;
}
.aw-title {
  font-weight: 900;
}
.aw-close {
  border: 1px solid var(--aw-border);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 900;
}

.aw-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.75);
  margin: 8px 0;
}
.aw-row .left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}
.aw-row .k {
  width: 22px;
  text-align: center;
  opacity: 0.9;
}

.aw-toggle {
  accent-color: rgb(202, 160, 110);
  width: 18px;
  height: 18px;
}

.aw-font-controls {
  display: inline-flex;
  gap: 8px;
}
.aw-font-controls button {
  border: 1px solid var(--aw-border);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 900;
  min-width: 40px;
}

.aw-actions {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.aw-action-btn {
  border: 1px solid var(--aw-border);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 900;
  text-align: center;
}
.aw-action-btn:hover {
  filter: brightness(1.03);
}

.aw-status {
  font-size: 0.92rem;
  opacity: 0.85;
  padding: 6px 8px 2px;
}

/* ===== Effects applied on <html> ===== */
html[data-aw-font="up1"] {
  font-size: 112.5%;
}
html[data-aw-font="up2"] {
  font-size: 125%;
}
html[data-aw-font="down1"] {
  font-size: 93.75%;
}

html[data-aw-contrast="soft"] {
  filter: contrast(1.06) brightness(1.02);
}
html[data-aw-contrast="high"] {
  filter: contrast(1.18) brightness(1.04);
}

html[data-aw-mono="on"] {
  filter: grayscale(1) contrast(1.05);
}

/* underline links */
html[data-aw-links="on"] a {
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

/* readable font */
html[data-aw-fontread="on"] body,
html[data-aw-fontread="on"] button,
html[data-aw-fontread="on"] input,
html[data-aw-fontread="on"] textarea,
html[data-aw-fontread="on"] select {
  font-family: Arial, "Assistant", sans-serif !important;
  letter-spacing: 0.2px;
}

/* block animations */
html[data-aw-motion="reduce"] * {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
/* ===== End of a11y.css ===== */
