:root {
  --pxw-widget-bg: rgba(12, 18, 28, 0.96);
  --pxw-widget-panel: #ffffff;
  --pxw-widget-accent: #126ACE;
  --pxw-widget-accent-2: #BAFA3A;
  --pxw-toggle-size: 58px;
  --pxw-font-size: 100%;
}

#pxw-accessibility-root {
  position: fixed;
  right: 20px;
  bottom: 28px;
  z-index: 2147483647;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px !important;
}

#pxw-toggle {
  width: var(--pxw-toggle-size);
  height: var(--pxw-toggle-size);
  border: none;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#pxw-toggle:hover {
  transform: translateY(-2px) scale(1.04);
}

#pxw-toggle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#pxw-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(360px, calc(100vw - 28px));
  max-height: calc(100vh - 116px);
  max-height: calc(100dvh - 116px);
  display: flex;
  flex-direction: column;
  background: var(--pxw-widget-panel);
  border-radius: 18px;
  box-shadow: 0 22px 44px rgba(15, 22, 32, 0.18);
  border: 1px solid rgba(18, 106, 206, 0.12);
  overflow: hidden;
}

#pxw-panel[hidden] { display: none; }

.pxw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: linear-gradient(135deg, #0f1730 0%, #1e2b45 100%);
  color: #fff;
  font-size: 1rem;
}

#pxw-close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.pxw-controls {
  min-height: 0;
  flex: 1 1 auto;
  padding: 14px 16px 0;
  display: grid;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.pxw-header,
#pxw-reset,
.pxw-footer {
  flex: 0 0 auto;
}

.pxw-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #1f2d3d;
  font-size: 0.95rem;
}

.pxw-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pxw-inline button,
#pxw-contrast,
.pxw-reset {
  border-radius: 10px;
  border: 1px solid rgba(18, 106, 206, 0.2);
  background: #f3f7ff;
  color: #162536;
  font-size: 0.9rem;
}

.pxw-inline button {
  min-width: 42px;
  height: 34px;
  cursor: pointer;
}

#pxw-contrast {
  width: 140px;
  height: 36px;
  padding: 0 10px;
}

.pxw-switch {
  display: grid;
  grid-template-columns: 1fr 52px;
  align-items: center;
  gap: 12px;
  color: #1f2d3d;
  font-size: 0.95rem;
}

#pxw-accessibility-root .pxw-switch > input[type="checkbox"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  appearance: none !important;
}

.pxw-slider {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #dfe7f3;
  transition: background 0.2s ease;
}

.pxw-slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 4px;
  top: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.pxw-switch input:checked + .pxw-slider {
  background: var(--pxw-widget-accent);
}

.pxw-switch input:checked + .pxw-slider::before {
  transform: translateX(22px);
}

#pxw-accessibility-root .pxw-switch > input:focus-visible + .pxw-slider {
  outline: 3px solid #ffbf47 !important;
  outline-offset: 3px !important;
}

.pxw-reset {
  width: calc(100% - 32px);
  margin: 18px 16px 10px;
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
}

.pxw-footer {
  background: #f4f8ff;
  border-top: 1px solid rgba(18, 106, 206, 0.12);
  padding: 14px 16px 16px;
}

.pxw-note {
  margin: 0 0 10px;
  color: #4d5d75;
  font-size: 0.76rem;
  text-align: center;
}

.pxw-brand {
  display: flex;
  justify-content: center;
}

.pxw-brand img {
  width: 120px;
  max-width: 100%;
  height: auto;
}

body.pxw-spacing,
body.pxw-spacing * {
  letter-spacing: 0.04em;
}

body.pxw-line-height,
body.pxw-line-height p,
body.pxw-line-height li,
body.pxw-line-height a,
body.pxw-line-height span,
body.pxw-line-height div {
  line-height: 1.9 !important;
}

body.pxw-grayscale :not(#pxw-accessibility-root):not(.pxw-widget-ancestor) {
  filter: grayscale(100%);
}

body.pxw-highlight-links a,
body.pxw-highlight-links button,
body.pxw-highlight-links [role="button"],
body.pxw-highlight-links input,
body.pxw-highlight-links select {
  outline: 3px solid #ffbf47 !important;
  outline-offset: 2px;
}

body.pxw-hide-images img,
body.pxw-hide-images picture,
body.pxw-hide-images svg,
body.pxw-hide-images video,
body.pxw-hide-images iframe[src*="youtube.com/embed"],
body.pxw-hide-images iframe[src*="youtube-nocookie.com/embed"],
body.pxw-hide-images iframe[src*="player.vimeo.com/video"] {
  opacity: 0 !important;
}

body.pxw-stop-animations *,
body.pxw-stop-animations *::before,
body.pxw-stop-animations *::after {
  animation-play-state: paused !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

body.pxw-large-cursor,
body.pxw-large-cursor * {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64"><circle cx="32" cy="32" r="27" fill="white" stroke="black" stroke-width="4"/><circle cx="32" cy="32" r="9" fill="%23ffbf47" stroke="black" stroke-width="2"/></svg>') 32 32, auto !important;
}

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

body.pxw-contrast-high *:not(#pxw-accessibility-root):not(#pxw-accessibility-root *) {
  background-color: #000 !important;
  color: #fff !important;
}

body.pxw-contrast-dark {
  background: #121212 !important;
  color: #f5f5f5 !important;
}

body.pxw-contrast-dark *:not(#pxw-accessibility-root):not(#pxw-accessibility-root *) {
  background-color: #1e1e1e !important;
  color: #f5f5f5 !important;
  border-color: #555 !important;
}

body.pxw-contrast-dark a:not(#pxw-accessibility-root a),
body.pxw-contrast-dark button:not(#pxw-accessibility-root button) {
  color: #8ecbff !important;
}

body.pxw-contrast-light {
  background: #fff !important;
  color: #111 !important;
}

body.pxw-contrast-light *:not(#pxw-accessibility-root):not(#pxw-accessibility-root *) {
  background-color: #fff !important;
  color: #111 !important;
}

#pxw-accessibility-root,
#pxw-accessibility-root *,
#pxw-accessibility-root *::before,
#pxw-accessibility-root *::after {
  box-sizing: border-box !important;
  letter-spacing: normal !important;
  line-height: normal !important;
  filter: none !important;
  opacity: 1 !important;
  cursor: auto !important;
  animation: none !important;
  transition: none !important;
}

#pxw-toggle:focus-visible,
#pxw-accessibility-root button:focus-visible,
#pxw-accessibility-root select:focus-visible,
#pxw-accessibility-root input:focus-visible {
  outline: 3px solid #ffbf47 !important;
  outline-offset: 3px !important;
}

@media (max-width: 640px) {
  #pxw-accessibility-root {
    right: 12px;
    bottom: 18px;
  }

  #pxw-panel {
    width: min(310px, calc(100vw - 30px));
    right: 0;
    bottom: 70px;
    max-height: calc(100vh - 104px);
    max-height: calc(100dvh - 104px);
  }
}

@media (max-height: 480px) {
  #pxw-panel {
    overflow-y: auto;
  }

  .pxw-controls {
    min-height: auto;
    flex: 0 0 auto;
    overflow-y: visible;
  }
}

#pxw-accessibility-root.pxw-position-bottom-left {
  right: auto;
  bottom: 28px;
  left: 20px;
  top: auto;
}

#pxw-accessibility-root.pxw-position-top-left {
  right: auto;
  bottom: auto;
  left: 20px;
  top: 28px;
}

#pxw-accessibility-root.pxw-position-bottom-right {
  right: 20px;
  bottom: 28px;
  left: auto;
  top: auto;
}

#pxw-accessibility-root.pxw-position-top-right {
  right: 20px;
  bottom: auto;
  left: auto;
  top: 28px;
}

#pxw-accessibility-root.pxw-position-bottom-left #pxw-panel,
#pxw-accessibility-root.pxw-position-top-left #pxw-panel {
  right: auto;
  left: 0;
}

#pxw-accessibility-root.pxw-position-bottom-right #pxw-panel,
#pxw-accessibility-root.pxw-position-top-right #pxw-panel {
  right: 0;
  left: auto;
}

#pxw-accessibility-root.pxw-position-bottom-left #pxw-panel,
#pxw-accessibility-root.pxw-position-bottom-right #pxw-panel {
  top: auto;
  bottom: 72px;
}

#pxw-accessibility-root.pxw-position-top-left #pxw-panel,
#pxw-accessibility-root.pxw-position-top-right #pxw-panel {
  top: 72px;
  bottom: auto;
}

@media (max-width: 640px) {
  #pxw-accessibility-root.pxw-position-bottom-left {
    left: 12px;
    bottom: 18px;
  }

  #pxw-accessibility-root.pxw-position-top-left {
    left: 12px;
    top: 18px;
  }

  #pxw-accessibility-root.pxw-position-bottom-right {
    right: 12px;
    bottom: 18px;
  }

  #pxw-accessibility-root.pxw-position-top-right {
    right: 12px;
    top: 18px;
  }
}
