/* NT Digital — סרגל תחתון משותף (מדיניות, תנאים, נגישות) + התאמות נגישות */

:root {
  --nt-bar-h: 58px;
  --nt-bar-safe: env(safe-area-inset-bottom, 0px);
}

body:has(#nt-site-bar) {
  padding-bottom: calc(var(--nt-bar-h) + var(--nt-bar-safe) + 8px);
}

/* וואטסאפ צף — מרים מעל הסרגל */
body:has(#nt-site-bar) .wa-float,
body:has(#nt-site-bar) .call-float {
  bottom: calc(var(--nt-bar-h) + var(--nt-bar-safe) + 20px) !important;
}

/* Toast צף (אם קיים) — מעל הסרגל */
body:has(#nt-site-bar) .sp-toast {
  bottom: calc(var(--nt-bar-h) + var(--nt-bar-safe) + 28px) !important;
}

@media (max-width: 520px) {
  body:has(#nt-site-bar) .wa-float,
  body:has(#nt-site-bar) .call-float {
    bottom: calc(var(--nt-bar-h) + var(--nt-bar-safe) + 16px) !important;
  }

  body:has(#nt-site-bar) .sp-toast {
    bottom: calc(var(--nt-bar-h) + var(--nt-bar-safe) + 20px) !important;
  }
}

/* System cursor on bar: demos use cursor:none + custom dot (invisible on black) */
#nt-site-bar,
#nt-site-bar * {
  cursor: auto !important;
}

#nt-site-bar a,
#nt-site-bar button {
  cursor: pointer !important;
}

#nt-site-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100002;
  direction: ltr;
  box-sizing: border-box;
  min-height: calc(var(--nt-bar-h) + var(--nt-bar-safe));
  padding: 0 max(12px, env(safe-area-inset-left)) max(6px, var(--nt-bar-safe)) max(12px, env(safe-area-inset-right));
  background: var(--nt-bar-bg, linear-gradient(180deg, #36343a 0%, #252328 100%));
  color: var(--nt-bar-fg, #fafafa);
  border-top: 1px solid var(--nt-bar-border, rgba(255, 255, 255, 0.12));
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
  font-family: system-ui, "Segoe UI", "Heebo", sans-serif;
  font-size: 0.8125rem;
}

#nt-site-bar .nt-site-bar__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: calc(var(--nt-bar-h) - 6px);
}

#nt-site-bar .nt-site-bar__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

#nt-site-bar .nt-site-bar__nav a,
#nt-site-bar .nt-site-bar__nav button {
  color: var(--nt-bar-fg, #fafafa);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  padding: 6px 4px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

#nt-site-bar .nt-site-bar__nav a:hover,
#nt-site-bar .nt-site-bar__nav a:focus-visible,
#nt-site-bar .nt-site-bar__nav button:hover,
#nt-site-bar .nt-site-bar__nav button:focus-visible {
  color: var(--nt-bar-fg, #fafafa);
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

#nt-site-bar .nt-site-bar__nav button:focus-visible,
#nt-site-bar .nt-site-bar__nav a:focus-visible {
  box-shadow: 0 0 0 2px var(--nt-bar-ring, rgba(255, 255, 255, 0.45));
}

#nt-site-bar .nt-site-bar__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

/* NT Digital + logo — single visual unit */
#nt-site-bar .nt-site-bar__mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--nt-bar-fg, #fafafa);
  opacity: 1;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  line-height: 1;
  padding: 3px 6px 3px 8px;
  margin: 0;
  border-radius: 8px;
  background: transparent;
  transition: opacity 0.15s ease, background 0.15s ease;
}

#nt-site-bar .nt-site-bar__mark:hover,
#nt-site-bar .nt-site-bar__mark:focus-visible {
  color: var(--nt-bar-fg, #fafafa);
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

#nt-site-bar .nt-site-bar__mark .nt-site-bar__tagline {
  color: inherit;
  opacity: 1;
  text-decoration: none;
  white-space: nowrap;
  font-size: inherit;
  font-weight: 600;
  letter-spacing: 0.04em;
}

#nt-site-bar .nt-site-bar__mark .nt-site-bar__logo {
  height: 22px;
  width: auto;
  max-width: 88px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
  vertical-align: middle;
}

/* כפתור נגישות צף (אמצע צד שמאל) */
#nt-a11y-trigger {
  position: fixed;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(14, 12, 26, 0.96), rgba(20, 16, 38, 0.93));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(102, 126, 234, 0.5);
  color: rgba(220, 215, 255, 0.95);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100001;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  padding: 0;
  font-size: 0;
}

#nt-a11y-trigger:hover,
#nt-a11y-trigger:focus-visible {
  transform: translateY(-50%) scale(1.08);
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 28px rgba(102, 126, 234, 0.45);
  outline: none;
}

#nt-a11y-trigger:focus-visible {
  box-shadow: 0 0 0 3px var(--nt-bar-ring, rgba(167, 139, 250, 0.6));
}

/* פאנל נגישות */
#nt-a11y-panel {
  position: fixed;
  left: 72px;
  right: auto;
  width: min(300px, calc(100vw - 90px));
  top: 50%;
  transform: translateY(-50%);
  max-width: 300px;
  margin: 0;
  z-index: 100003;
  background: var(--nt-panel-bg, #1a1a1e);
  color: var(--nt-panel-fg, #f4f4f5);
  border: 1px solid var(--nt-panel-border, rgba(255, 255, 255, 0.14));
  border-radius: 12px;
  padding: 14px 16px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  font-family: system-ui, "Heebo", sans-serif;
  direction: rtl;
  text-align: right;
}

#nt-a11y-panel[hidden] {
  display: none !important;
}

#nt-a11y-panel h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 12px;
}

#nt-a11y-panel .nt-a11y-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#nt-a11y-panel button {
  font: inherit;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  text-align: right;
  transition: background 0.15s ease;
}

#nt-a11y-panel button:hover,
#nt-a11y-panel button:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

#nt-a11y-panel .nt-a11y-close {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  color: inherit;
  opacity: 0.85;
}

#nt-a11y-panel .nt-a11y-close:hover {
  opacity: 1;
}

#nt-a11y-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100001;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  cursor: pointer;
}

#nt-a11y-backdrop[hidden] {
  display: none !important;
}

/* התאמות על html */
html.nt-a11y-fs1 {
  font-size: 106%;
}

html.nt-a11y-fs2 {
  font-size: 118%;
}

html.nt-a11y-contrast body {
  filter: contrast(1.2) saturate(1.05);
}

html.nt-a11y-links-ul body a:not(.nt-site-bar__nav a):not(#nt-float a) {
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  #nt-site-bar .nt-site-bar__nav a,
  #nt-site-bar .nt-site-bar__nav button {
    transition: none;
  }
}
