/* SmartAgent accessibility widget + document adjustments */

.sa-a11y {
  position: fixed;
  z-index: 100000;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.sa-a11y[data-position="top-left"] {
  top: 0;
  left: 0;
}

.sa-a11y[data-position="bottom-left"] {
  bottom: 1.25rem;
  left: 1.25rem;
}

.sa-a11y-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #e53935;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(229, 57, 53, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.sa-a11y[data-position="bottom-left"] .sa-a11y-trigger {
  border-radius: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

.sa-a11y-trigger:hover {
  background: #c62828;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(229, 57, 53, 0.5);
}

.sa-a11y-trigger:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.sa-a11y-trigger-icon {
  display: block;
  font-size: 1.625rem;
  line-height: 1;
  flex-shrink: 0;
  pointer-events: none;
}

.sa-a11y-panel {
  position: absolute;
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(34rem, calc(100vh - 5rem));
  overflow: auto;
  background: #111113;
  color: #f5f5f5;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  border-radius: 0;
}

.sa-a11y[data-position="top-left"] .sa-a11y-panel {
  top: 100%;
  left: 0;
  margin-top: 0;
}

.sa-a11y[data-position="bottom-left"] .sa-a11y-panel {
  bottom: calc(100% + 0.65rem);
  left: 0;
}

.sa-a11y-panel[hidden] {
  display: none !important;
}

.sa-a11y-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sa-a11y-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sa-a11y-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.sa-a11y-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.sa-a11y-close:focus-visible {
  outline: 2px solid #e53935;
  outline-offset: 2px;
}

.sa-a11y-body {
  padding: 0.75rem 1rem 1rem;
}

.sa-a11y-group {
  margin-bottom: 1rem;
}

.sa-a11y-group:last-child {
  margin-bottom: 0;
}

.sa-a11y-group-label {
  display: block;
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.sa-a11y-options {
  display: grid;
  gap: 0.45rem;
}

.sa-a11y-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.sa-a11y-option:hover {
  border-color: rgba(229, 57, 53, 0.55);
  background: rgba(229, 57, 53, 0.1);
}

.sa-a11y-option[aria-pressed="true"],
.sa-a11y-option.is-active {
  border-color: #e53935;
  background: rgba(229, 57, 53, 0.18);
  box-shadow: inset 3px 0 0 #e53935;
}

.sa-a11y-option:focus-visible {
  outline: 2px solid #e53935;
  outline-offset: 2px;
}

.sa-a11y-option-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.sa-a11y-option-hint {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

.sa-a11y-segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
}

.sa-a11y-segment {
  min-height: 2.5rem;
  padding: 0.4rem 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.sa-a11y-segment[aria-pressed="true"] {
  border-color: #e53935;
  background: #e53935;
  color: #fff;
}

.sa-a11y-foot {
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 0.5rem;
}

.sa-a11y-link {
  display: block;
  text-align: center;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.sa-a11y-link:hover {
  border-color: rgba(229, 57, 53, 0.6);
  background: rgba(229, 57, 53, 0.12);
}

.sa-a11y-reset {
  width: 100%;
  min-height: 2.5rem;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.sa-a11y-reset:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Document adjustments (applied on <html>) */

html {
  --sa-a11y-font-scale: 1;
}

html.sa-a11y-font-lg {
  --sa-a11y-font-scale: 1.125;
  font-size: 112.5% !important;
}

html.sa-a11y-font-xl {
  --sa-a11y-font-scale: 1.25;
  font-size: 125% !important;
}

/* Customer portal uses fixed px font sizes — scale main surfaces explicitly */
html.sa-a11y-font-lg .portal-shell,
html.sa-a11y-font-lg .login-shell,
html.sa-a11y-font-lg .blocked-shell,
html.sa-a11y-font-lg .checkout-overlay,
html.sa-a11y-font-lg .toast,
html.sa-a11y-font-xl .portal-shell,
html.sa-a11y-font-xl .login-shell,
html.sa-a11y-font-xl .blocked-shell,
html.sa-a11y-font-xl .checkout-overlay,
html.sa-a11y-font-xl .toast {
  zoom: var(--sa-a11y-font-scale);
}

@supports not (zoom: 1) {
  html.sa-a11y-font-lg .portal-shell,
  html.sa-a11y-font-lg .login-shell,
  html.sa-a11y-font-lg .blocked-shell,
  html.sa-a11y-font-xl .portal-shell,
  html.sa-a11y-font-xl .login-shell,
  html.sa-a11y-font-xl .blocked-shell {
    transform: scale(var(--sa-a11y-font-scale));
    transform-origin: top center;
  }
}

html.sa-a11y-line-height {
  line-height: 1.85 !important;
}

html.sa-a11y-line-height body {
  line-height: 1.85;
}

html.sa-a11y-contrast {
  filter: contrast(1.25);
}

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

html.sa-a11y-grayscale {
  filter: grayscale(1);
}

html.sa-a11y-links a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
}

html.sa-a11y-highlight-links a {
  background: rgba(255, 235, 59, 0.35) !important;
  outline: 1px solid #fbc02d !important;
}

html.sa-a11y-readable-font,
html.sa-a11y-readable-font body {
  font-family: Arial, Helvetica, "Segoe UI", sans-serif !important;
}

html.sa-a11y-big-cursor,
html.sa-a11y-big-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' stroke='%23fff' stroke-width='1.5' d='M4 4 L4 26 L11 19 L16 28 L20 26 L15 17 L24 17 Z'/%3E%3C/svg%3E") 4 4, auto !important;
}

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

@media (max-width: 640px) {
  .sa-a11y-panel {
    width: min(20rem, calc(100vw - 1.5rem));
  }

  .sa-a11y[data-position="bottom-left"] {
    bottom: 1rem;
    left: 1rem;
  }
}
