/* ===========================================================================
   The site's one top bar (2026-10-18), on every page: the home page (v2), the
   plans, the Windows app, streamers, tutorials and support pages. Its own
   class names (smt-*) so no page's stylesheet can restyle it, and its own
   colours, so it looks the same on a page whose theme is something else.
   Markup: tools/site-nav.mjs (topHtml); behaviour: /assets/site-top.js.
   =========================================================================== */

.smt {
  --smt-fg: #eaf0fa;
  --smt-muted: #97a6bf;
  --smt-faint: #66758f;
  --smt-line: rgba(148, 163, 184, 0.09);
  --smt-border: rgba(148, 163, 184, 0.14);
  --smt-grad: linear-gradient(135deg, #22d3ee 0%, #7c5cff 100%);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--smt-line);
  background: rgba(5, 8, 18, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  color: var(--smt-fg);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  direction: rtl;
}

.smt *,
.smt *::before,
.smt *::after {
  box-sizing: border-box;
}

.smt__in {
  display: flex;
  align-items: center;
  gap: 28px;
  width: min(1200px, calc(100% - 32px));
  min-height: 72px;
  margin-inline: auto;
}

.smt__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--smt-fg);
  text-decoration: none;
}

.smt__brand img {
  width: 40px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(34, 211, 238, 0.45));
}

.smt__brand b {
  display: block;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

.smt__brand small {
  display: block;
  color: var(--smt-faint);
  font-size: 11px;
  font-weight: 600;
}

.smt__nav {
  display: flex;
  gap: 4px;
  margin-inline-start: auto;
}

.smt__nav a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--smt-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition:
    color 0.2s,
    background 0.2s;
}

.smt__nav a:hover,
.smt__nav a[aria-current] {
  color: var(--smt-fg);
  background: rgba(255, 255, 255, 0.05);
}

.smt__nav a[aria-current] {
  color: #67e8f9;
}

.smt__cta {
  display: flex;
  gap: 8px;
}

.smt__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.25s,
    background 0.25s,
    border-color 0.25s;
}

.smt__btn:active {
  transform: scale(0.98);
}

.smt__btn--primary {
  background: var(--smt-grad);
  color: #041019;
  box-shadow: 0 14px 40px -14px rgba(34, 211, 238, 0.8);
}

.smt__btn--primary:hover {
  box-shadow: 0 18px 50px -12px rgba(34, 211, 238, 0.95);
}

.smt__btn--ghost {
  border-color: var(--smt-border);
  background: rgba(255, 255, 255, 0.035);
  color: var(--smt-fg);
}

.smt__btn--ghost:hover {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.07);
}

.smt__btn[hidden] {
  display: none;
}

/* The menu button, and the menu it opens, on narrow screens only. */
.smt__menu {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--smt-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--smt-fg);
  cursor: pointer;
}

.smt__menu svg {
  display: block;
  margin: auto;
}

@media (max-width: 960px) {
  .smt__in {
    gap: 12px;
  }

  .smt__nav {
    display: none;
  }

  .smt__cta {
    margin-inline-start: auto;
  }

  .smt__menu {
    display: block;
  }

  .smt.is-open .smt__nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px 16px;
    border-bottom: 1px solid var(--smt-line);
    background: rgba(5, 8, 18, 0.97);
  }

  .smt.is-open .smt__nav a {
    padding: 12px 14px;
    font-size: 15px;
  }
}

@media (max-width: 520px) {
  .smt__cta .smt__btn--ghost {
    display: none;
  }

  .smt__brand small {
    display: none;
  }
}

/* Phones get the light page (html.lite): no blur behind the bar. */
.lite .smt {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: rgba(5, 8, 18, 0.97);
}

/* «به اینترنت متصل نیستید» (site-top.js, 2026-10-18). */
.smt-offline {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 560px;
  margin-inline: auto;
  padding: 12px 16px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 14px;
  background: rgba(20, 16, 6, 0.94);
  color: #fde68a;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 14px;
  direction: rtl;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.7);
}

.smt-offline i {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fbbf24;
}

/* «حراج» on the site's prices (2026-10-18): the element with the price carries
   data-was (the list price) and data-badge; the list price is drawn struck
   through in red above it, the badge beside it. Set by the build from
   config/prices.json and again by each page's script from the API. */
[data-was]::before {
  content: attr(data-was);
  display: block;
  margin-bottom: 2px;
  background: none;
  -webkit-text-fill-color: #97a6bf;
  color: #97a6bf;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0;
  text-decoration: line-through;
  text-decoration-color: #ef4444;
  text-decoration-thickness: 1.5px;
  text-shadow: none;
}

[data-badge]::after {
  content: attr(data-badge);
  display: inline-block;
  margin-inline-start: 8px;
  padding: 2px 9px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.16);
  -webkit-text-fill-color: #fecaca;
  color: #fecaca;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: 0;
  text-decoration: none;
  text-shadow: none;
  vertical-align: middle;
}

[data-free="1"] + span,
[data-free="1"] + .cmp__unit {
  display: none;
}
