/**
 * Nagish Advanced Accessibility Toolbar CSS
 * State-of-the-art RTL-first accessibility engine with rich design tokens.
 */

:root {
  /* ==========================================================================
     Coinbase Institutional Design Tokens (YAML Spec)
     ========================================================================== */
  --cb-primary: #0052ff;
  --cb-primary-active: #003ecc;
  --cb-primary-disabled: #a8b8cc;
  --cb-ink: #0a0b0d;
  --cb-body: #5b616e;
  --cb-body-strong: #0a0b0d;
  --cb-muted: #7c828a;
  --cb-muted-soft: #a8acb3;
  --cb-hairline: #dee1e6;
  --cb-hairline-soft: #eef0f3;
  --cb-canvas: #ffffff;
  --cb-surface-soft: #f7f7f7;
  --cb-surface-card: #ffffff;
  --cb-surface-strong: #eef0f3;
  --cb-surface-dark: #0a0b0d;
  --cb-surface-dark-elevated: #16181c;
  --cb-on-primary: #ffffff;
  --cb-on-dark: #ffffff;
  --cb-on-dark-soft: #a8acb3;
  --cb-semantic-up: #05b169;
  --cb-semantic-down: #cf202f;
  --cb-accent-yellow: #f4b000;

  --cb-rounded-none: 0px;
  --cb-rounded-xs: 4px;
  --cb-rounded-sm: 8px;
  --cb-rounded-md: 12px;
  --cb-rounded-lg: 16px;
  --cb-rounded-xl: 24px;
  --cb-rounded-pill: 100px;
  --cb-rounded-full: 9999px;

  /* Nagish Mapped System Variables */
  --nagish-brand: var(--cb-primary);
  --nagish-brand-hover: var(--cb-primary-active);
  --nagish-brand-disabled: var(--cb-primary-disabled);
  --nagish-brand-light: var(--cb-surface-strong);
  --nagish-brand-glow: rgba(0, 82, 255, 0.22);
  --nagish-bg: var(--cb-canvas);
  --nagish-surface: var(--cb-surface-soft);
  --nagish-surface-hover: var(--cb-surface-strong);
  --nagish-surface-dark: var(--cb-surface-dark);
  --nagish-surface-dark-elevated: var(--cb-surface-dark-elevated);
  --nagish-border: var(--cb-hairline);
  --nagish-border-soft: var(--cb-hairline-soft);
  --nagish-text: var(--cb-ink);
  --nagish-text-muted: var(--cb-body);
  --nagish-text-soft: var(--cb-muted);
  --nagish-success: var(--cb-semantic-up);
  --nagish-danger: var(--cb-semantic-down);
  --nagish-accent-yellow: var(--cb-accent-yellow);
  --nagish-drawer-width: 440px;
  --nagish-shadow: 0 20px 48px rgba(10, 11, 13, 0.12), 0 0 1px 1px rgba(10, 11, 13, 0.05);

  /* Geometry Tokens */
  --nagish-radius-pill: var(--cb-rounded-pill);
  --nagish-radius-card: var(--cb-rounded-xl);
  --nagish-radius-input: var(--cb-rounded-md);
  --nagish-radius-sm: var(--cb-rounded-sm);

  /* Dynamic CSS transformation variables */
  --nagish-font-scale: 1;
  --nagish-line-height: normal;
  --nagish-letter-spacing: normal;
}

/* ==========================================================================
   CSS Isolation & Theme Wall (Immunity against ANY WordPress theme)
   ========================================================================== */
#nagish-widget-root,
#nagish-widget-root *,
#nagish-widget-root *::before,
#nagish-widget-root *::after {
  box-sizing: border-box !important;
  font-family: 'Noto Sans Hebrew', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-shadow: none !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Neutralize external theme pseudo-elements on standard buttons */
#nagish-widget-root button:not(.nagish-feature-btn):not(.nagish-palette-card)::before,
#nagish-widget-root button:not(.nagish-feature-btn):not(.nagish-palette-card)::after {
  content: none !important;
}

#nagish-widget-root .nagish-trigger-pulse::before,
#nagish-widget-root .nagish-trigger-pulse::after {
  content: "" !important;
}

#nagish-widget-root {
  direction: rtl !important;
  text-align: right !important;
  z-index: 2147483647 !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  color: var(--nagish-text) !important;
}

#nagish-widget-root button {
  font-family: 'Noto Sans Hebrew', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  box-shadow: none;
  text-shadow: none !important;
  cursor: pointer;
  background-image: none !important;
  filter: none !important;
}

#nagish-widget-root p,
#nagish-widget-root span,
#nagish-widget-root a,
#nagish-widget-root div,
#nagish-widget-root button {
  text-decoration: none;
}

/* Strict [hidden] protection against aggressive theme CSS resets */
#nagish-widget-root [hidden],
#nagish-widget-root .nagish-drawer[hidden],
#nagish-widget-root .nagish-trigger-button[hidden],
#nagish-widget-root .nagish-badge-counter[hidden],
#nagish-widget-root .nagish-backdrop[hidden],
.nagish-drawer[hidden],
.nagish-trigger-button[hidden],
.nagish-badge-counter[hidden],
.nagish-backdrop[hidden] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Zero Horizontal Overflow Enforcer: strictly prevent horizontal scrolling inside widget */
#nagish-widget-root,
#nagish-widget-root .nagish-drawer,
#nagish-widget-root .nagish-drawer-header,
#nagish-widget-root .nagish-tabs-nav,
#nagish-widget-root .nagish-drawer-body,
#nagish-widget-root .nagish-tab-pane,
#nagish-widget-root .nagish-drawer-footer,
#nagish-widget-root .nagish-submodal,
#nagish-widget-root .nagish-submodal-content,
#nagish-widget-root .nagish-submodal-header,
#nagish-widget-root .nagish-submodal-body,
#nagish-widget-root .nagish-coordinator-card,
#nagish-widget-root .nagish-barrier-report-wrapper {
  overflow-x: hidden !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   Floating Trigger Button
   ========================================================================== */
#nagish-widget-root .nagish-trigger-button,
.nagish-trigger-button {
  position: fixed !important;
  bottom: var(--nagish-widget-bottom, 24px) !important;
  left: var(--nagish-widget-left, 24px) !important;
  right: var(--nagish-widget-right, auto) !important;
  width: 54px !important;
  height: 54px !important;
  border-radius: 50% !important;
  background: #0052FF !important;
  background-color: #0052FF !important;
  background-image: none !important;
  color: #FFFFFF !important;
  fill: #FFFFFF !important;
  border: 2px solid #FFFFFF !important;
  box-shadow: 0 6px 20px var(--nagish-brand-glow), 0 2px 6px rgba(10, 11, 13, 0.12) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  z-index: 2147483647 !important;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, box-shadow 0.2s ease !important;
  box-sizing: border-box !important;
}

#nagish-widget-root .nagish-trigger-button:hover,
.nagish-trigger-button:hover {
  background: #003ECC !important;
  background-color: #003ECC !important;
  transform: scale(1.08) !important;
  box-shadow: 0 10px 26px var(--nagish-brand-glow), 0 4px 10px rgba(10, 11, 13, 0.15) !important;
}

#nagish-widget-root .nagish-trigger-button:active,
.nagish-trigger-button:active {
  background: #003ECC !important;
  background-color: #003ECC !important;
  transform: scale(0.95) !important;
}

#nagish-widget-root .nagish-trigger-button:focus-visible,
.nagish-trigger-button:focus-visible {
  outline: 3px solid var(--nagish-text) !important;
  outline-offset: 4px !important;
}

/* Ensure the floating trigger button is strictly hidden whenever the drawer or popup is open */
#nagish-widget-root .nagish-trigger-button[hidden],
#nagish-widget-root .nagish-trigger-button[aria-expanded="true"],
.nagish-trigger-button[hidden],
.nagish-trigger-button[aria-expanded="true"],
html.nagish-drawer-open #nagish-widget-root .nagish-trigger-button,
html.nagish-drawer-open .nagish-trigger-button,
body.nagish-drawer-open #nagish-widget-root .nagish-trigger-button,
body.nagish-drawer-open .nagish-trigger-button {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* ==========================================================================
   Background Page Scroll Lock (when drawer or popup is open)
   ========================================================================== */
html.nagish-drawer-open,
body.nagish-drawer-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none;
}

/* Active state: strictly remains a compact circular sphere with active glow and count indicator badge */
.nagish-trigger-button.nagish-trigger-active {
  width: 54px !important;
  height: 54px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  box-shadow: 0 6px 24px rgba(0, 82, 255, 0.5), 0 2px 8px rgba(10, 11, 13, 0.2) !important;
}

.nagish-trigger-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--nagish-brand);
  opacity: 0.6;
  animation: nagish-pulse 2.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  pointer-events: none;
}

.nagish-trigger-button.nagish-trigger-active .nagish-trigger-pulse {
  display: block !important;
  animation: nagish-pulse 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite !important;
}

@keyframes nagish-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

.nagish-badge-counter {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #FFFFFF;
  color: var(--nagish-brand);
  font-size: 11px;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--nagish-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  line-height: 1;
}

/* ==========================================================================
   Drawer Container
   ========================================================================== */
#nagish-widget-root .nagish-drawer,
.nagish-drawer {
  position: fixed !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: var(--nagish-drawer-width) !important;
  max-width: 100vw !important;
  height: 100% !important;
  height: 100dvh !important;
  background: var(--nagish-bg) !important;
  color: var(--nagish-text) !important;
  box-shadow: var(--nagish-shadow) !important;
  z-index: 999995 !important;
  display: flex !important;
  flex-direction: column !important;
  border-right: 1px solid var(--nagish-border) !important;
  animation: nagish-slide-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  overscroll-behavior: contain !important;
  touch-action: pan-y !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

@keyframes nagish-slide-in {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

#nagish-widget-root .nagish-drawer[hidden],
.nagish-drawer[hidden] {
  display: none !important;
}

#nagish-widget-root .nagish-backdrop,
.nagish-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  backdrop-filter: none;
  z-index: 999992;
  overscroll-behavior: none !important;
  touch-action: none !important;
}

#nagish-widget-root .nagish-backdrop[hidden],
.nagish-backdrop[hidden] {
  display: none !important;
}

/* ==========================================================================
   Drawer Header
   ========================================================================== */
#nagish-widget-root .nagish-drawer-header,
.nagish-drawer-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 20px 24px !important;
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  border-bottom: 1px solid var(--nagish-border) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
}

#nagish-widget-root .nagish-header-title-wrap,
.nagish-header-title-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

#nagish-widget-root .nagish-header-icon-box,
.nagish-header-icon-box {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  border-radius: var(--nagish-radius-pill) !important;
  background: var(--nagish-brand-light) !important;
  background-color: #EEF0F3 !important;
  color: var(--nagish-brand) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: none !important;
  padding: 0 !important;
}

#nagish-widget-root .nagish-header-icon-box svg {
  color: #0052FF !important;
  stroke: #0052FF !important;
}

#nagish-widget-root .nagish-drawer-title,
.nagish-drawer-title {
  margin: 0 !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.4px !important;
  color: #0A0B0D !important;
  line-height: 1.25 !important;
  padding: 0 !important;
}

#nagish-widget-root .nagish-drawer-subtitle,
.nagish-drawer-subtitle {
  font-size: 0.8rem !important;
  color: #5B616E !important;
  font-weight: 400 !important;
  margin: 2px 0 0 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
  display: block !important;
}

#nagish-widget-root .nagish-close-button,
#nagish-close-btn.nagish-close-button,
.nagish-close-button {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  border-radius: var(--nagish-radius-pill) !important;
  border: 1px solid #DEE1E6 !important;
  background: #F7F7F7 !important;
  background-color: #F7F7F7 !important;
  color: #5B616E !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  transition: all 0.15s ease !important;
}

#nagish-widget-root .nagish-close-button:hover,
#nagish-close-btn.nagish-close-button:hover,
.nagish-close-button:hover {
  background: #EEF0F3 !important;
  background-color: #EEF0F3 !important;
  color: #0A0B0D !important;
  border-color: #5B616E !important;
}

#nagish-widget-root .nagish-close-button svg,
.nagish-close-button svg {
  stroke: currentColor !important;
  fill: none !important;
}

/* ==========================================================================
   Tabs Navigation
   ========================================================================== */
#nagish-widget-root .nagish-tabs-nav,
.nagish-tabs-nav {
  display: flex !important;
  background: #F7F7F7 !important;
  background-color: #F7F7F7 !important;
  border-bottom: 1px solid #DEE1E6 !important;
  padding: 8px 12px !important;
  gap: 6px !important;
}

#nagish-widget-root .nagish-tab-btn,
.nagish-tab-btn {
  flex: 1 !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  padding: 8px 6px !important;
  border-radius: var(--nagish-radius-pill) !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: #5B616E !important;
  cursor: pointer !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  outline: none !important;
  transition: all 0.15s ease !important;
}

#nagish-widget-root .nagish-tab-btn:hover,
.nagish-tab-btn:hover {
  background: #EEF0F3 !important;
  background-color: #EEF0F3 !important;
  color: #0A0B0D !important;
}

#nagish-widget-root .nagish-tab-btn.active,
.nagish-tab-btn.active {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  color: #0052FF !important;
  box-shadow: 0 1px 4px rgba(10, 11, 13, 0.06) !important;
  border: 1px solid #DEE1E6 !important;
}

/* ==========================================================================
   Drawer Body & Panes
   ========================================================================== */
#nagish-widget-root .nagish-drawer-body,
.nagish-drawer-body {
  flex: 1 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  touch-action: pan-y !important;
  padding: 20px 20px 24px 20px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  scrollbar-width: thin !important;
  scrollbar-color: #DEE1E6 transparent !important;
}

#nagish-widget-root .nagish-drawer-body::-webkit-scrollbar {
  width: 5px !important;
  height: 0px !important; /* Zero horizontal scrollbar */
}

#nagish-widget-root .nagish-drawer-body::-webkit-scrollbar-track {
  background: transparent !important;
}

#nagish-widget-root .nagish-drawer-body::-webkit-scrollbar-thumb {
  background: #DEE1E6 !important;
  border-radius: 9999px !important;
}

#nagish-widget-root .nagish-drawer-body::-webkit-scrollbar-thumb:hover {
  background: #A8ACB3 !important;
}

#nagish-widget-root .nagish-tab-pane,
.nagish-tab-pane {
  display: none;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

#nagish-widget-root .nagish-tab-pane.active,
.nagish-tab-pane.active {
  display: block !important;
  animation: nagish-fade-pane 0.22s ease forwards;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

@keyframes nagish-fade-pane {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

#nagish-widget-root .nagish-pane-intro,
.nagish-pane-intro {
  margin: 0 0 16px 0 !important;
  font-size: 0.88rem !important;
  color: #5B616E !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
  padding: 0 !important;
}

#nagish-widget-root .nagish-group-title,
.nagish-group-title {
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  color: #5B616E !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  margin: 0 0 12px 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
}

#nagish-widget-root .nagish-group-title.nagish-mt-20,
.nagish-group-title.nagish-mt-20 {
  margin-top: 20px !important;
}

/* ==========================================================================
   TAB 1: Quick Profile Cards
   ========================================================================== */
.nagish-profiles-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#nagish-widget-root .nagish-profile-card,
.nagish-profile-card {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  border: 1px solid var(--nagish-border) !important;
  border-radius: 20px !important;
  padding: 14px 16px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  cursor: pointer !important;
  text-align: right !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
  width: 100% !important;
  box-shadow: 0 1px 3px rgba(10, 11, 13, 0.02) !important;
  box-sizing: border-box !important;
}

#nagish-widget-root .nagish-profile-card:hover,
.nagish-profile-card:hover {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  border-color: var(--nagish-brand) !important;
  box-shadow: 0 4px 12px rgba(10, 11, 13, 0.06) !important;
  transform: translateY(-1px) !important;
}

#nagish-widget-root .nagish-profile-card[aria-pressed="true"],
.nagish-profile-card[aria-pressed="true"] {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  border-color: var(--nagish-brand) !important;
  box-shadow: 0 0 0 1.5px var(--nagish-brand), 0 4px 14px rgba(0, 82, 255, 0.12) !important;
}

#nagish-widget-root .nagish-prof-icon,
.nagish-prof-icon {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  border-radius: var(--nagish-radius-pill) !important;
  background: var(--nagish-brand-light) !important;
  background-color: #EEF0F3 !important;
  border: 1px solid var(--nagish-border-soft) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--nagish-brand) !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
}

#nagish-widget-root .nagish-profile-card[aria-pressed="true"] .nagish-prof-icon,
.nagish-profile-card[aria-pressed="true"] .nagish-prof-icon {
  background: var(--nagish-brand) !important;
  background-color: #0052FF !important;
  color: #FFFFFF !important;
  border-color: var(--nagish-brand) !important;
}

#nagish-widget-root .nagish-prof-text,
.nagish-prof-text {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-align: right !important;
}

#nagish-widget-root .nagish-prof-text h4,
#nagish-widget-root .nagish-prof-text .nagish-prof-title,
.nagish-prof-text h4,
.nagish-prof-text .nagish-prof-title {
  margin: 0 0 4px 0 !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #0A0B0D !important;
  line-height: 1.25 !important;
  padding: 0 !important;
  letter-spacing: normal !important;
}

#nagish-widget-root .nagish-prof-text p,
#nagish-widget-root .nagish-prof-text .nagish-prof-desc,
.nagish-prof-text p,
.nagish-prof-text .nagish-prof-desc {
  margin: 0 !important;
  font-size: 0.8rem !important;
  color: #5B616E !important;
  line-height: 1.4 !important;
  font-weight: 400 !important;
  padding: 0 !important;
}

#nagish-widget-root .nagish-prof-toggle,
.nagish-prof-toggle {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 24px !important;
  min-height: 24px !important;
  border-radius: 9999px !important;
  background: #DEE1E6 !important;
  position: relative !important;
  transition: background 0.2s ease !important;
  flex-shrink: 0 !important;
  display: block !important;
  margin-inline-start: 8px !important;
  box-sizing: border-box !important;
}

#nagish-widget-root .nagish-prof-toggle::after,
.nagish-prof-toggle::after {
  content: "" !important;
  position: absolute !important;
  top: 3px !important;
  left: 3px !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  background: #FFFFFF !important;
  box-shadow: 0 1px 3px rgba(10, 11, 13, 0.25) !important;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  display: block !important;
}

#nagish-widget-root .nagish-profile-card[aria-pressed="true"] .nagish-prof-toggle,
.nagish-profile-card[aria-pressed="true"] .nagish-prof-toggle {
  background: #0052FF !important;
  background-color: #0052FF !important;
}

#nagish-widget-root .nagish-profile-card[aria-pressed="true"] .nagish-prof-toggle::after,
.nagish-profile-card[aria-pressed="true"] .nagish-prof-toggle::after {
  transform: translateX(20px) !important;
}

/* ==========================================================================
   Steppers & Controls
   ========================================================================== */
#nagish-widget-root .nagish-control-box,
.nagish-control-box {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  border: 1px solid var(--nagish-border) !important;
  border-radius: 16px !important;
  padding: 16px !important;
  margin-bottom: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

#nagish-widget-root .nagish-ctrl-header,
.nagish-ctrl-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 12px !important;
}

#nagish-widget-root .nagish-ctrl-title,
.nagish-ctrl-title {
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  color: var(--nagish-text) !important;
}

#nagish-widget-root .nagish-ctrl-value,
.nagish-ctrl-value {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: var(--nagish-brand) !important;
  background: var(--nagish-brand-light) !important;
  padding: 4px 10px !important;
  border-radius: var(--nagish-radius-pill) !important;
}

#nagish-widget-root .nagish-stepper-bar,
.nagish-stepper-bar {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#nagish-widget-root .nagish-step-btn,
.nagish-step-btn {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  border-radius: var(--nagish-radius-pill) !important;
  border: 1px solid var(--nagish-border) !important;
  background: var(--nagish-surface) !important;
  color: var(--nagish-text) !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
}

#nagish-widget-root .nagish-step-btn:hover,
.nagish-step-btn:hover {
  background: var(--nagish-brand) !important;
  color: #FFFFFF !important;
  border-color: var(--nagish-brand) !important;
}

#nagish-widget-root .nagish-step-track,
.nagish-step-track {
  flex: 1 !important;
  min-width: 0 !important;
  height: 8px !important;
  border-radius: var(--nagish-radius-pill) !important;
  background: var(--nagish-surface-hover) !important;
  overflow: hidden !important;
  position: relative !important;
}

#nagish-widget-root .nagish-step-fill,
.nagish-step-fill {
  height: 100% !important;
  background: var(--nagish-brand) !important;
  border-radius: var(--nagish-radius-pill) !important;
  transition: width 0.2s ease !important;
}

/* ==========================================================================
   Toggles & Feature Cards (UserWay-Inspired Clean Grid Style)
   ========================================================================== */
#nagish-widget-root .nagish-toggles-grid,
.nagish-toggles-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#nagish-widget-root .nagish-feature-btn,
.nagish-feature-btn {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  border: 1.5px solid var(--cb-hairline-soft) !important;
  border-radius: 18px !important;
  padding: 14px 4px 12px 4px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  cursor: pointer !important;
  text-align: center !important;
  box-shadow: 0 2px 8px rgba(10, 11, 13, 0.03) !important;
  position: relative !important;
  min-height: 100px !important;
  aspect-ratio: 1 / 0.98 !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.nagish-feature-btn:hover {
  background: #FFFFFF;
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(10, 11, 13, 0.08);
  transform: translateY(-2px);
}

.nagish-feature-btn[aria-pressed="true"] {
  background: #FFFFFF !important;
  border: 2px solid var(--nagish-brand) !important;
  box-shadow: 0 0 0 1px var(--nagish-brand), 0 4px 14px rgba(0, 82, 255, 0.12) !important;
  color: var(--nagish-brand) !important;
}

/* Corner Checkmark Badge */
.nagish-feature-btn::after {
  content: '✓';
  position: absolute;
  top: 7px;
  left: 7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f0f3f7;
  color: #a0aec0;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  line-height: 1;
  pointer-events: none;
}

[dir="ltr"] .nagish-feature-btn::after {
  left: auto;
  right: 7px;
}

.nagish-feature-btn[aria-pressed="true"]::after {
  opacity: 1;
  background: #e8f0fe;
  color: var(--nagish-brand);
  transform: scale(1.08);
  font-weight: 800;
}

[dir="ltr"] .nagish-alignment-grid [data-toggle="alignRight"] { order: 3; }
[dir="ltr"] .nagish-alignment-grid [data-toggle="alignCenter"] { order: 2; }
[dir="ltr"] .nagish-alignment-grid [data-toggle="alignLeft"] { order: 1; }


/* Free-floating Clean Vector Icon */
.nagish-feature-btn .feat-icon {
  width: 34px;
  height: 34px;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nagish-text);
  margin-top: 6px;
  margin-bottom: 2px;
  transition: color 0.18s ease, transform 0.18s ease;
}

.nagish-feature-btn .feat-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 2px;
}

.nagish-feature-btn:hover .feat-icon {
  transform: translateY(-1px);
}

.nagish-feature-btn[aria-pressed="true"] .feat-icon {
  color: var(--nagish-brand) !important;
  background: transparent !important;
  border: none !important;
}

.feat-glyph-df {
  font-size: 1.55rem;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.5px;
  line-height: 1;
}

/* Feature Label */
.nagish-feature-btn .feat-label {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--nagish-text);
  text-align: center;
  padding: 0 4px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.18s ease;
}

.nagish-feature-btn[aria-pressed="true"] .feat-label {
  color: var(--nagish-brand) !important;
  font-weight: 700;
}

/* Hide legacy bottom switch dot to keep card pristine */
.nagish-feature-btn .feat-switch {
  display: none !important;
}

/* ==========================================================================
   TAB 3: Contrast Presets Grid (UserWay Clean Aesthetic)
   ========================================================================== */
#nagish-widget-root .nagish-contrast-grid,
.nagish-contrast-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#nagish-widget-root .nagish-palette-card,
.nagish-palette-card {
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  border: 1.5px solid var(--cb-hairline-soft) !important;
  border-radius: 18px !important;
  padding: 14px 4px 12px 4px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  text-align: center !important;
  box-shadow: 0 2px 8px rgba(10, 11, 13, 0.03) !important;
  position: relative !important;
  min-height: 100px !important;
  aspect-ratio: 1 / 0.98 !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.nagish-palette-card:hover {
  background: #FFFFFF;
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(10, 11, 13, 0.08);
  transform: translateY(-2px);
}

.nagish-palette-card.active {
  border: 2px solid var(--nagish-brand) !important;
  background: #FFFFFF !important;
  box-shadow: 0 0 0 1px var(--nagish-brand), 0 4px 14px rgba(0, 82, 255, 0.12) !important;
}

.nagish-palette-card.active .palette-name {
  color: var(--nagish-brand) !important;
  font-weight: 700;
}

.nagish-palette-card::after {
  content: '✓';
  position: absolute;
  top: 7px;
  left: 7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f0f3f7;
  color: #a0aec0;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  line-height: 1;
}

[dir="ltr"] .nagish-palette-card::after {
  left: auto;
  right: 7px;
}

.nagish-palette-card.active::after {
  opacity: 1;
  transform: scale(1.08);
  background: #e8f0fe;
  color: var(--nagish-brand);
  font-weight: 800;
}

.nagish-palette-card .palette-swatch {
  width: 30px;
  height: 30px;
  border-radius: var(--nagish-radius-pill);
  border: 1.5px solid var(--nagish-border);
  margin-top: 4px;
  margin-bottom: 2px;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.nagish-palette-card:hover .palette-swatch {
  transform: scale(1.08);
}

.nagish-palette-card .palette-name {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--nagish-text);
  text-align: center;
  padding: 0 4px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.18s ease;
}

.swatch-normal { background: linear-gradient(135deg, #0052ff 0%, #05b169 50%, #f4b000 100%); }
.swatch-dark { background: #0a0b0d; }
.swatch-light { background: #FFFFFF; }
.swatch-invert { background: linear-gradient(135deg, #0a0b0d 50%, #FFFFFF 50%); }
.swatch-mono { background: linear-gradient(135deg, #334155 0%, #94A3B8 100%); }
.swatch-yellow { background: #000000; border-color: #FFFF00; position: relative; }
.swatch-yellow::after { content: 'A'; color: #FFFF00; font-weight: 800; font-size: 14px; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.swatch-sepia { background: #FBF0D9; }
.swatch-high-sat { background: linear-gradient(135deg, #FF0077 0%, #00F0FF 100%); }
.swatch-low-sat { background: linear-gradient(135deg, #64748B 0%, #CBD5E1 100%); }


/* ==========================================================================
   TAB 5: Legal & Assistance Cards
   ========================================================================== */
.nagish-gov-card-btn {
  background: #FFFFFF;
  border: 1px solid var(--nagish-border);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  text-align: right;
  width: 100%;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.nagish-gov-card-btn:hover {
  background: var(--nagish-surface);
  border-color: var(--nagish-brand);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 11, 13, 0.05);
}

.nagish-gov-card-btn .gov-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--nagish-radius-pill);
  background: var(--nagish-brand-light);
  color: var(--nagish-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nagish-gov-card-btn .gov-text {
  flex: 1;
}

.nagish-gov-card-btn .gov-text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--nagish-text);
  font-weight: 600;
  margin-bottom: 2px;
}

.nagish-gov-card-btn .gov-text span {
  font-size: 0.8rem;
  color: var(--nagish-text-muted);
  font-weight: 400;
}

.nagish-gov-card-btn .gov-arrow {
  color: var(--nagish-brand);
  font-weight: 600;
  font-size: 1.1rem;
}

.nagish-btn-wide {
  width: 100%;
  background: var(--nagish-brand);
  border: none;
  border-radius: var(--nagish-radius-pill);
  padding: 12px 20px;
  height: 44px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.nagish-btn-wide:hover {
  background: var(--nagish-brand-hover);
  box-shadow: 0 4px 12px var(--nagish-brand-glow);
}

.nagish-btn-wide:active {
  background: var(--nagish-brand-hover);
  transform: scale(0.98);
}

/* ==========================================================================
   Drawer Footer (2-Tier: Utilities / Compliance & Discreet Credentials)
   ========================================================================== */
#nagish-widget-root .nagish-drawer-footer,
.nagish-drawer-footer {
  padding: 12px 18px 10px !important;
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  border-top: 1px solid var(--nagish-border) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

#nagish-widget-root .nagish-footer-main,
.nagish-footer-main {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  flex-wrap: wrap !important;
}

#nagish-widget-root .nagish-footer-actions,
.nagish-footer-actions {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

#nagish-widget-root .nagish-footer-action-link,
#nagish-widget-root .nagish-footer-action-btn,
.nagish-footer-action-link,
.nagish-footer-action-btn {
  background: #F7F7F7 !important;
  background-color: #F7F7F7 !important;
  border: 1px solid #DEE1E6 !important;
  color: #0A0B0D !important;
  padding: 7px 12px !important;
  border-radius: var(--nagish-radius-pill) !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  text-decoration: none !important;
  line-height: 1 !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}

#nagish-widget-root .nagish-footer-action-link:hover,
#nagish-widget-root .nagish-footer-action-btn:hover,
.nagish-footer-action-link:hover,
.nagish-footer-action-btn:hover {
  background: #EEF0F3 !important;
  background-color: #EEF0F3 !important;
  border-color: #5B616E !important;
  color: #0052FF !important;
}

#nagish-widget-root .nagish-footer-action-link svg,
#nagish-widget-root .nagish-footer-action-btn svg,
.nagish-footer-action-link svg,
.nagish-footer-action-btn svg {
  color: var(--nagish-brand) !important;
  flex-shrink: 0 !important;
}

#nagish-widget-root .nagish-reset-button,
.nagish-reset-button {
  background: #F7F7F7 !important;
  background-color: #F7F7F7 !important;
  border: 1px solid #DEE1E6 !important;
  color: #5B616E !important;
  padding: 7px 14px !important;
  border-radius: var(--nagish-radius-pill) !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

#nagish-widget-root .nagish-reset-button:hover,
.nagish-reset-button:hover {
  background: #FEE2E2 !important;
  background-color: #FEE2E2 !important;
  color: var(--nagish-danger) !important;
  border-color: #FCA5A5 !important;
}

.nagish-footer-credit-wrap {
  padding-top: 6px;
  border-top: 1px solid var(--cb-hairline-soft, #f0f2f5);
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nagish-credit a {
  font-size: 0.72rem;
  font-weight: 500;
  color: #8c919a;
  text-decoration: none;
  transition: color 0.15s;
  letter-spacing: -0.1px;
}

.nagish-credit a:hover {
  color: var(--nagish-brand);
  text-decoration: underline;
}

/* ==========================================================================
   Sub-Modals (Statement, Coordinator, Barrier, Structure)
   ========================================================================== */
.nagish-submodal {
  position: fixed;
  inset: 0;
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 11, 13, 0.45);
  backdrop-filter: none;
  animation: nagish-fade-in 0.2s ease forwards;
  overscroll-behavior: contain !important;
  touch-action: pan-y;
}

#nagish-widget-root .nagish-submodal[hidden],
.nagish-submodal[hidden] {
  display: none !important;
}

.nagish-submodal-content {
  background: #FFFFFF;
  border-radius: var(--nagish-radius-card);
  width: 680px;
  max-width: 96vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--nagish-shadow);
  border: 1px solid var(--nagish-border);
  overflow: hidden;
  animation: nagish-scale-up 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  overscroll-behavior: contain !important;
}

@keyframes nagish-scale-up {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

#nagish-widget-root .nagish-submodal-header,
.nagish-submodal-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 18px 24px !important;
  background: #FFFFFF !important;
  background-color: #FFFFFF !important;
  border-bottom: 1px solid var(--nagish-border) !important;
}

#nagish-widget-root .nagish-submodal-header h3,
#nagish-widget-root .nagish-submodal-header .nagish-submodal-title,
.nagish-submodal-header h3,
.nagish-submodal-header .nagish-submodal-title {
  margin: 0 !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.4px !important;
  color: #0A0B0D !important;
  line-height: 1.25 !important;
  padding: 0 !important;
}

#nagish-widget-root .nagish-submodal-close,
.nagish-submodal-close {
  background: #F7F7F7 !important;
  background-color: #F7F7F7 !important;
  border: 1px solid #DEE1E6 !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  color: #5B616E !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  border-radius: var(--nagish-radius-pill) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  transition: all 0.15s ease !important;
}

#nagish-widget-root .nagish-submodal-close:hover,
.nagish-submodal-close:hover {
  background: #FEE2E2 !important;
  background-color: #FEE2E2 !important;
  color: var(--nagish-danger) !important;
  border-color: #FCA5A5 !important;
}

#nagish-widget-root .nagish-submodal-body,
.nagish-submodal-body {
  flex: 1 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  touch-action: pan-y !important;
  padding: 24px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  scrollbar-width: thin !important;
  scrollbar-color: #DEE1E6 transparent !important;
}

#nagish-widget-root .nagish-submodal-body::-webkit-scrollbar {
  width: 5px !important;
  height: 0px !important;
}

#nagish-widget-root .nagish-submodal-body::-webkit-scrollbar-track {
  background: transparent !important;
}

#nagish-widget-root .nagish-submodal-body::-webkit-scrollbar-thumb {
  background: #DEE1E6 !important;
  border-radius: 9999px !important;
}

#nagish-widget-root .nagish-submodal-body::-webkit-scrollbar-thumb:hover {
  background: #A8ACB3 !important;
}

/* ==========================================================================
   Coordinator Card & Policy Action
   ========================================================================== */
.nagish-coordinator-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nagish-coord-header {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--nagish-text);
  letter-spacing: -0.3px;
}

.nagish-coord-intro {
  margin: 0;
  font-size: 0.9rem;
  color: var(--nagish-text-muted);
  line-height: 1.55;
}

.nagish-coord-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--nagish-surface);
  border: 1px solid var(--nagish-border);
  border-radius: var(--nagish-radius-card);
  padding: 16px 20px;
}

.nagish-coord-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--nagish-text);
}

.nagish-coord-list li strong {
  min-width: 90px;
  font-weight: 600;
  color: var(--nagish-text-muted);
  font-size: 0.85rem;
}

.nagish-coord-list li a {
  color: var(--nagish-brand);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.15s ease;
}

.nagish-coord-list li a:hover {
  text-decoration: underline;
  color: var(--nagish-brand-hover);
}

.nagish-coord-arrangements {
  background: #f8fafc;
  border: 1px solid var(--nagish-border);
  border-radius: var(--nagish-radius-card);
  padding: 14px 18px;
}

.nagish-coord-arrangements h4,
.nagish-coord-arrangements .nagish-coord-arrangements-title {
  margin: 0 0 6px !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  color: var(--nagish-text) !important;
  line-height: 1.3 !important;
}

.nagish-coord-arrangements p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--nagish-text-muted);
  line-height: 1.5;
}

.nagish-coord-statement-action {
  margin-top: 8px;
  display: flex;
}

.nagish-btn-statement-full {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: var(--nagish-brand);
  color: #FFFFFF !important;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--nagish-radius-pill);
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 82, 255, 0.25);
}

.nagish-btn-statement-full:hover {
  background: var(--nagish-brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.35);
}

/* ==========================================================================
   Interactive Reading Aids Elements (Ruler & Mask)
   ========================================================================== */
.nagish-ruler {
  position: fixed;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--nagish-brand);
  box-shadow: 0 0 10px var(--nagish-brand-glow), 0 0 0 1px #FFFFFF;
  pointer-events: none;
  z-index: 999980;
  transition: top 0.05s linear;
}

#nagish-widget-root .nagish-ruler[hidden],
.nagish-ruler[hidden] {
  display: none !important;
}

.nagish-mask-block {
  position: fixed;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.65);
  pointer-events: none;
  z-index: 999979;
}

.nagish-mask-top {
  top: 0;
}

.nagish-mask-bottom {
  bottom: 0;
}

#nagish-widget-root .nagish-mask-block[hidden],
.nagish-mask-block[hidden] {
  display: none !important;
}

/* ==========================================================================
   Transformative Website Classes Applied to <body>
   ========================================================================== */

/* ==========================================================================
   Transformative Website Classes Applied to <body>
   ========================================================================== */

/* High Contrast Dark Mode */
body.nagish-contrast-dark {
  background-color: #0C0F14 !important;
  color: #F1F5F9 !important;
}
body.nagish-contrast-dark > :not(#nagish-widget-root) {
  background-color: transparent !important;
}
body.nagish-contrast-dark > :not(#nagish-widget-root) :is(h1, h2, h3, h4, h5, h6, p, span, li, dt, dd, blockquote, label, div, section, article, header, nav, footer, main, aside) {
  color: #F1F5F9 !important;
  background-color: transparent !important;
  border-color: #334155 !important;
}
body.nagish-contrast-dark > :not(#nagish-widget-root) a {
  color: #93C5FD !important;
  text-decoration: underline !important;
}

/* High Contrast Light Mode */
body.nagish-contrast-light {
  background-color: #FFFFFF !important;
  color: #000000 !important;
}
body.nagish-contrast-light > :not(#nagish-widget-root) {
  background-color: #FFFFFF !important;
}
body.nagish-contrast-light > :not(#nagish-widget-root) :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, blockquote, label) {
  color: #000000 !important;
}
body.nagish-contrast-light > :not(#nagish-widget-root) a {
  color: #0000EE !important;
  text-decoration: underline !important;
}

/* Invert Colors Mode (High Contrast Inversion with preserved media) */
body.nagish-contrast-invert {
  background-color: #0C0F14 !important;
  color: #FFFFFF !important;
}
body.nagish-contrast-invert > :not(#nagish-widget-root) {
  background-color: #FFFFFF !important;
  color: #000000 !important;
  filter: invert(100%) hue-rotate(180deg) !important;
}
body.nagish-contrast-invert > :not(#nagish-widget-root) :is(img, video, picture, svg:not(.nagish-icon)) {
  filter: invert(100%) hue-rotate(180deg) !important;
}

/* Monochrome Mode */
body.nagish-contrast-mono {
  background-color: #FFFFFF !important;
}
body.nagish-contrast-mono > :not(#nagish-widget-root) {
  background-color: #FFFFFF !important;
  filter: grayscale(100%) !important;
}

/* Yellow on Black Mode */
body.nagish-contrast-yellow {
  background-color: #000000 !important;
  color: #FFFF00 !important;
}
body.nagish-contrast-yellow > :not(#nagish-widget-root) {
  background-color: #000000 !important;
}
body.nagish-contrast-yellow > :not(#nagish-widget-root) :is(h1, h2, h3, h4, h5, h6, p, span, li, dt, dd, blockquote, label, div, section, article, header, nav, footer, main, aside) {
  color: #FFFF00 !important;
  background-color: transparent !important;
  border-color: #FFFF00 !important;
}
body.nagish-contrast-yellow > :not(#nagish-widget-root) a {
  color: #00FFFF !important;
  text-decoration: underline !important;
}

/* Warm Sepia Mode (Kindle Paperwhite Reading Contrast) */
body.nagish-contrast-sepia {
  background-color: #F7EAD0 !important;
  color: #3E2723 !important;
}
body.nagish-contrast-sepia > :not(#nagish-widget-root) {
  filter: sepia(85%) contrast(95%) !important;
  background-color: #F7EAD0 !important;
}
body.nagish-contrast-sepia > :not(#nagish-widget-root) :is(h1, h2, h3, h4, h5, h6, p, span, li, dt, dd, blockquote, label) {
  color: #3E2723 !important;
}
body.nagish-contrast-sepia > :not(#nagish-widget-root) a {
  color: #5D4037 !important;
  text-decoration: underline !important;
}

/* High Saturation Mode (Vivid & Enhanced Distinction) */
body.nagish-contrast-high-sat > :not(#nagish-widget-root) {
  filter: saturate(300%) contrast(115%) !important;
}
body.nagish-contrast-high-sat > :not(#nagish-widget-root) a {
  color: #0045E6 !important;
  text-decoration: underline !important;
  filter: saturate(200%) !important;
}
body.nagish-contrast-high-sat > :not(#nagish-widget-root) :is(h1, h2, h3, h4, h5, h6) {
  color: #001A72 !important;
}
body.nagish-contrast-high-sat > :not(#nagish-widget-root) :is(button, .wp-element-button, input[type="submit"]) {
  filter: saturate(250%) contrast(120%) !important;
}

/* Low Saturation Mode (Muted & Glare-Free for Photophobia / Sensory Relief) */
body.nagish-contrast-low-sat {
  background-color: #F3F4F6 !important;
}
body.nagish-contrast-low-sat > :not(#nagish-widget-root) {
  background-color: #F3F4F6 !important;
  filter: saturate(25%) contrast(92%) !important;
}
body.nagish-contrast-low-sat > :not(#nagish-widget-root) :is(h1, h2, h3, h4, h5, h6, p, span, li, dt, dd, blockquote, label) {
  color: #374151 !important;
}
body.nagish-contrast-low-sat > :not(#nagish-widget-root) a {
  color: #4B5563 !important;
  text-decoration: underline !important;
}

/* Readable & Dyslexia Fonts */
body.nagish-readable-font > :not(#nagish-widget-root) :is(h1, h2, h3, h4, h5, h6, p, span, a, li, button, input, textarea, select) {
  font-family: 'Noto Sans Hebrew', Arial, Helvetica, sans-serif !important;
}
body.nagish-dyslexia-font > :not(#nagish-widget-root) :is(h1, h2, h3, h4, h5, h6, p, span, a, li, button, input, textarea, select) {
  font-family: 'Comic Sans MS', 'OpenDyslexic', 'Noto Sans Hebrew', sans-serif !important;
  letter-spacing: 0.05em !important;
}

/* Text Alignment */
body.nagish-align-right > :not(#nagish-widget-root) :is(p, h1, h2, h3, h4, h5, h6, li) {
  text-align: right !important;
}
body.nagish-align-center > :not(#nagish-widget-root) :is(p, h1, h2, h3, h4, h5, h6, li) {
  text-align: center !important;
}
body.nagish-align-left > :not(#nagish-widget-root) :is(p, h1, h2, h3, h4, h5, h6, li) {
  text-align: left !important;
}

/* Dynamic Line Height Classes */
body.nagish-line-height-1 > :not(#nagish-widget-root) :is(p, h1, h2, h3, h4, h5, h6, li, blockquote, dd, dt) {
  line-height: 1.6 !important;
}
body.nagish-line-height-2 > :not(#nagish-widget-root) :is(p, h1, h2, h3, h4, h5, h6, li, blockquote, dd, dt) {
  line-height: 1.9 !important;
}
body.nagish-line-height-3 > :not(#nagish-widget-root) :is(p, h1, h2, h3, h4, h5, h6, li, blockquote, dd, dt) {
  line-height: 2.3 !important;
}

/* Dynamic Letter Spacing Classes */
body.nagish-letter-spacing-1 > :not(#nagish-widget-root) :is(p, h1, h2, h3, h4, h5, h6, li, a, span) {
  letter-spacing: 0.05em !important;
}
body.nagish-letter-spacing-2 > :not(#nagish-widget-root) :is(p, h1, h2, h3, h4, h5, h6, li, a, span) {
  letter-spacing: 0.1em !important;
}
body.nagish-letter-spacing-3 > :not(#nagish-widget-root) :is(p, h1, h2, h3, h4, h5, h6, li, a, span) {
  letter-spacing: 0.16em !important;
}

/* Dynamic Scaling & Text Reflow (IS 5568 / WCAG 1.4.10 Reflow & WCAG 1.4.4 Resize Text) */
html.nagish-font-scaled,
body[class*="nagish-scaled-"] {
  overflow-x: clip !important;
  max-width: 100vw !important;
}

/* Ensure typography wraps gracefully without blowing out the mobile screen horizontally */
body[class*="nagish-scaled-"] > :not(#nagish-widget-root),
body[class*="nagish-scaled-"] > :not(#nagish-widget-root) * {
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  box-sizing: border-box !important;
}

/* Maintain stable root 100% font size so toolbar drawer and fixed tools are never distorted */
html.nagish-font-scaled {
  font-size: 100% !important;
}

/* Proportional content scaling across all theme elements without double-multiplying html base */
body.nagish-scaled-90 > :not(#nagish-widget-root) :is(h1, h2, h3, h4, h5, h6, p, li, blockquote, dd, dt, label, input, textarea, select, button, a) { font-size: 0.9em !important; }
body.nagish-scaled-110 > :not(#nagish-widget-root) :is(h1, h2, h3, h4, h5, h6, p, li, blockquote, dd, dt, label, input, textarea, select, button, a) { font-size: 1.1em !important; }
body.nagish-scaled-120 > :not(#nagish-widget-root) :is(h1, h2, h3, h4, h5, h6, p, li, blockquote, dd, dt, label, input, textarea, select, button, a) { font-size: 1.2em !important; }
body.nagish-scaled-130 > :not(#nagish-widget-root) :is(h1, h2, h3, h4, h5, h6, p, li, blockquote, dd, dt, label, input, textarea, select, button, a) { font-size: 1.3em !important; }
body.nagish-scaled-140 > :not(#nagish-widget-root) :is(h1, h2, h3, h4, h5, h6, p, li, blockquote, dd, dt, label, input, textarea, select, button, a) { font-size: 1.4em !important; }
body.nagish-scaled-150 > :not(#nagish-widget-root) :is(h1, h2, h3, h4, h5, h6, p, li, blockquote, dd, dt, label, input, textarea, select, button, a) { font-size: 1.5em !important; }

/* Highlight Links */
body.nagish-highlight-links > :not(#nagish-widget-root) a {
  background-color: #FEF08A !important;
  color: #000000 !important;
  text-decoration: underline 2px #000000 !important;
  padding: 2px 4px !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
}

/* Highlight Headings */
body.nagish-highlight-headings > :not(#nagish-widget-root) :is(h1, h2, h3, h4, h5, h6) {
  background-color: var(--nagish-brand-light) !important;
  color: var(--nagish-text) !important;
  border-right: 5px solid var(--nagish-brand) !important;
  padding: 4px 10px !important;
  border-radius: var(--cb-rounded-xs) !important;
}

/* Stop Animations */
body.nagish-stop-animations > :not(#nagish-widget-root) *,
body.nagish-stop-animations > :not(#nagish-widget-root) *::before,
body.nagish-stop-animations > :not(#nagish-widget-root) *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* Hide Images */
body.nagish-hide-images > :not(#nagish-widget-root) :is(img, video, iframe, svg) {
  opacity: 0.05 !important;
  filter: blur(10px) !important;
}

/* Large Black Cursor */
body.nagish-cursor-black,
body.nagish-cursor-black * {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24" fill="%23000000" stroke="%23FFFFFF" stroke-width="2.5"><path d="M3 3l7 18 3-7 7-3L3 3z"/></svg>'), auto !important;
}

/* Large White Cursor */
body.nagish-cursor-white,
body.nagish-cursor-white * {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24" fill="%23FFFFFF" stroke="%23000000" stroke-width="2.5"><path d="M3 3l7 18 3-7 7-3L3 3z"/></svg>'), auto !important;
}

/* ==========================================================================
   Text Magnifier Floating Lens
   ========================================================================== */
.nagish-magnifier-lens {
  position: fixed;
  z-index: 999990;
  pointer-events: none;
  background: #0F172A;
  color: #F8FAFC;
  border: 2px solid #38BDF8;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  max-width: 440px;
  padding: 12px 16px;
  transition: opacity 0.12s ease;
  direction: rtl;
  text-align: right;
}

#nagish-widget-root .nagish-magnifier-lens[hidden],
.nagish-magnifier-lens[hidden] {
  display: none !important;
}

.nagish-magnifier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #334155;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.nagish-lens-badge {
  background: #38BDF8;
  color: #0F172A;
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 800;
  font-size: 0.75rem;
}

.nagish-magnifier-body {
  font-size: 1.32rem;
  line-height: 1.5;
  font-weight: 600;
  color: #FFFFFF;
}

/* ==========================================================================
   Structure Navigator Tree & Jump Flash
   ========================================================================== */
.nagish-nav-tree {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nagish-nav-item-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--nagish-surface);
  border: 1px solid var(--nagish-border);
  color: var(--nagish-text);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  text-align: right;
  transition: all 0.15s ease;
}

.nagish-nav-item-btn:hover {
  background: var(--nagish-brand-light);
  color: var(--nagish-brand);
  border-color: var(--nagish-brand);
  transform: translateX(-4px);
}

.nagish-nav-badge {
  background: var(--nagish-brand);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.nagish-nav-badge-landmark {
  background: #059669;
}

.nagish-nav-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes nagish-target-pulse {
  0% { box-shadow: 0 0 0 5px var(--nagish-brand); outline: 3px solid var(--nagish-brand); }
  50% { box-shadow: 0 0 0 10px var(--nagish-danger); outline: 3px solid var(--nagish-danger); }
  100% { box-shadow: none; outline: none; }
}

.nagish-highlight-target {
  animation: nagish-target-pulse 2.2s ease forwards !important;
  scroll-margin-top: 100px;
}

/* ==========================================================================
   Barrier Report Form Submodal Styles
   ========================================================================== */
.nagish-barrier-report-wrapper {
  direction: rtl;
  text-align: right;
}

.nagish-form-desc {
  color: var(--nagish-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.nagish-form-group {
  margin-bottom: 16px;
}

.nagish-form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--nagish-text);
  margin-bottom: 6px;
}

.nagish-required {
  color: #EF4444;
  margin-right: 4px;
}

.nagish-input,
.nagish-textarea {
  width: 100%;
  border: 1.5px solid var(--nagish-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.92rem;
  color: var(--nagish-text);
  background: #FFFFFF;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nagish-input:focus,
.nagish-textarea:focus {
  outline: none;
  border-color: var(--nagish-brand);
  box-shadow: 0 0 0 3px var(--nagish-brand-glow);
}

.nagish-submit-btn {
  background: var(--nagish-brand);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.nagish-submit-btn:hover {
  background: var(--nagish-brand-hover);
  transform: translateY(-1px);
}

.nagish-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.nagish-feedback-box {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  display: none;
}

.nagish-feedback-box.success {
  display: block;
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.nagish-feedback-box.error {
  display: block;
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

/* ==========================================================================
   Responsive Adaptations for Small Screens & Mobile (IS 5568 / WCAG 2.1)
   ========================================================================== */
@media (max-width: 480px) {
  .nagish-drawer {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    border-radius: 0 !important;
    border-right: none !important;
    border-left: none !important;
  }

  .nagish-drawer-header {
    padding: 16px 18px;
  }

  .nagish-drawer-title {
    font-size: 1.15rem;
  }

  .nagish-drawer-subtitle {
    font-size: 0.75rem;
  }

  .nagish-close-button {
    width: 36px;
    height: 36px;
  }

  .nagish-tabs-nav {
    padding: 6px 8px;
    gap: 4px;
  }

  .nagish-tab-btn {
    padding: 6px 2px;
    font-size: 0.74rem;
    gap: 2px;
  }

  .nagish-tab-btn svg {
    width: 18px;
    height: 18px;
  }

  .nagish-drawer-body {
    padding: 14px;
  }

  .nagish-profile-card {
    padding: 12px 14px;
    gap: 10px;
  }

  .nagish-prof-icon {
    width: 38px;
    height: 38px;
  }

  #nagish-widget-root .nagish-prof-text h4,
  #nagish-widget-root .nagish-prof-text .nagish-prof-title,
  .nagish-prof-text h4,
  .nagish-prof-text .nagish-prof-title {
    font-size: 0.9rem !important;
  }

  #nagish-widget-root .nagish-prof-text p,
  #nagish-widget-root .nagish-prof-text .nagish-prof-desc,
  .nagish-prof-text p,
  .nagish-prof-text .nagish-prof-desc {
    font-size: 0.75rem !important;
  }

  .nagish-toggles-grid,
  .nagish-contrast-grid {
    gap: 8px;
  }

  .nagish-feature-btn,
  .nagish-palette-card {
    min-height: 88px;
    padding: 10px 4px 8px 4px;
    border-radius: 14px;
  }

  .nagish-feature-btn .feat-label,
  .nagish-palette-card .palette-label {
    font-size: 0.72rem;
    line-height: 1.2;
    word-break: break-word;
  }

  /* Drawer Footer Mobile Layout (2-Tier: Row 1 = 2 compliance links 50/50, Row 2 = full reset) */
  .nagish-drawer-footer {
    padding: 12px 14px 10px;
    gap: 8px;
  }

  .nagish-footer-main {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }

  .nagish-footer-actions {
    display: flex;
    width: 100%;
    gap: 8px;
  }

  .nagish-footer-action-link,
  .nagish-footer-action-btn {
    flex: 1 1 0;
    justify-content: center;
    text-align: center;
    padding: 9px 8px;
    font-size: 0.82rem;
    border-radius: var(--nagish-radius-pill);
    box-sizing: border-box;
  }

  .nagish-reset-button {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 9px 14px;
    font-size: 0.82rem;
    border-radius: var(--nagish-radius-pill);
    box-sizing: border-box;
  }

  .nagish-footer-credit-wrap {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding-top: 6px;
  }

  /* Submodal responsive styling */
  .nagish-submodal {
    padding: 12px;
  }

  .nagish-submodal-content {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 16px;
  }

  .nagish-submodal-header {
    padding: 14px 16px;
  }

  #nagish-widget-root .nagish-submodal-header h3,
  #nagish-widget-root .nagish-submodal-header .nagish-submodal-title,
  .nagish-submodal-header h3,
  .nagish-submodal-header .nagish-submodal-title {
    font-size: 1.1rem !important;
  }

  .nagish-submodal-body {
    padding: 14px 16px;
  }

  /* Mobile Floating Trigger Button (Compact Sphere) */
  .nagish-trigger-button {
    bottom: max(16px, env(safe-area-inset-bottom, 16px)) !important;
    left: var(--nagish-widget-left, 16px) !important;
    right: var(--nagish-widget-right, auto) !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    padding: 0 !important;
  }

  .nagish-trigger-button.nagish-trigger-active {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    padding: 0 !important;
  }
}

@media (max-width: 360px) {
  .nagish-tab-btn {
    font-size: 0.7rem;
  }

  .nagish-footer-action-link,
  .nagish-footer-action-btn,
  .nagish-reset-button {
    font-size: 0.78rem;
    padding: 8px 6px;
  }
}

