.aw-widget {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999999;
  font-family: Arial, Helvetica, sans-serif;
}

.aw-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0b5ed7;
  color: #fff;
  border: none;
  border-radius: 10px 0 0 10px;
  padding: 14px 12px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  min-height: 160px;
  transition: background 0.25s ease, transform 0.2s ease;
}

.aw-toggle:hover,
.aw-toggle:focus {
  background: #0849a6;
  outline: none;
}

.aw-toggle:focus-visible,
.aw-close:focus-visible,
.aw-btn:focus-visible {
  outline: 3px solid #111;
  outline-offset: 2px;
}

.aw-toggle-icon {
  font-size: 22px;
  line-height: 1;
}

.aw-toggle-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.aw-panel {
  position: absolute;
  right: 62px;
  top: 50%;
  transform: translateY(-50%);
  width: 290px;
  background: #fff;
  color: #222;
  border: 1px solid #dcdcdc;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.aw-panel.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.aw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0b5ed7;
  color: #fff;
  padding: 14px 16px;
}

.aw-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.aw-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.aw-body {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.aw-btn {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d8d8d8;
  background: #f7f7f7;
  color: #222;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.aw-btn:hover {
  background: #ededed;
}

.aw-btn.is-active {
  background: #dbeafe;
  border-color: #7db3ff;
}

.aw-reset {
  background: #fff1f1;
  border-color: #f2b8b8;
}

/* Modes */
html.aw-grayscale {
  filter: grayscale(100%);
}

html.aw-negative {
  filter: invert(1) hue-rotate(180deg);
}

html.aw-underline-links a {
  text-decoration: underline !important;
}

html.aw-readable-font body,
html.aw-readable-font button,
html.aw-readable-font input,
html.aw-readable-font textarea,
html.aw-readable-font select {
  font-family: Arial, Helvetica, sans-serif !important;
}

html.aw-reduce-motion *,
html.aw-reduce-motion *::before,
html.aw-reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* High contrast mode */
html.aw-high-contrast,
html.aw-high-contrast body {
  background: #000 !important;
  color: #fff !important;
}

html.aw-high-contrast body,
html.aw-high-contrast main,
html.aw-high-contrast section,
html.aw-high-contrast article,
html.aw-high-contrast aside,
html.aw-high-contrast header,
html.aw-high-contrast footer,
html.aw-high-contrast nav,
html.aw-high-contrast div {
  background-color: #000 !important;
  color: #fff !important;
}

html.aw-high-contrast h1,
html.aw-high-contrast h2,
html.aw-high-contrast h3,
html.aw-high-contrast h4,
html.aw-high-contrast h5,
html.aw-high-contrast h6,
html.aw-high-contrast p,
html.aw-high-contrast span,
html.aw-high-contrast li,
html.aw-high-contrast label,
html.aw-high-contrast strong,
html.aw-high-contrast em {
  color: #fff !important;
}

html.aw-high-contrast a {
  color: #00ffff !important;
}

html.aw-high-contrast button,
html.aw-high-contrast input,
html.aw-high-contrast textarea,
html.aw-high-contrast select {
  background: #111 !important;
  color: #fff !important;
  border: 1px solid #fff !important;
}

/* Mobile */
@media (max-width: 768px) {
  .aw-widget {
    top: auto;
    bottom: 18px;
    right: 14px;
    transform: none;
  }

  .aw-toggle {
    writing-mode: horizontal-tb;
    text-orientation: initial;
    min-height: auto;
    min-width: 56px;
    border-radius: 999px;
    padding: 12px 14px;
  }

  .aw-panel {
    right: 0;
    top: auto;
    bottom: 64px;
    transform: none;
    width: 280px;
  }

  .aw-panel.open {
    transform: none;
  }
}
