/* threadsync-enterprise-nav.css — v1 2026-05-12
 *
 * Adds three things to the existing ThreadSync nav:
 *  1. Command-deck mobile menu (replaces flat link list inside #ts-mobile-nav)
 *  2. Buyer strip below the existing <header>
 *  3. Targeted no-wrap CSS for the 1024–1279px range
 *
 * Does NOT restyle the existing desktop nav — preserves it as-is.
 * All class names prefixed `ts-cmd-` and `ts-bs-` to avoid collisions
 * with the existing `ts-mobile-nav` and `ts-nav` classes.
 */

/* ─── 1. No-wrap fix for the existing desktop nav at 1024–1279px ─── */
@media (min-width: 1024px) and (max-width: 1279px) {
  .ts-site-header .ts-nav { gap: 6px !important; }
  .ts-site-header .ts-nav a,
  .ts-site-header .ts-nav .ts-nav-trigger {
    font-size: 0.82rem !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    white-space: nowrap !important;
  }
  .ts-site-header .ts-header-actions { gap: 6px !important; }
  .ts-site-header .ts-btn-primary {
    font-size: 0.82rem !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    white-space: nowrap !important;
  }
}

/* ─── 2. Buyer strip (rendered below the existing <header>) ─── */
.ts-bs-strip {
  position: relative;
  z-index: 5;
  border-top: 1px solid rgba(148, 163, 184, 0.10);
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ts-bs-inner {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 38px;
  padding: 6px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ts-bs-label {
  color: #67e8f9;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ts-bs-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0 10px;
  white-space: nowrap;
  transition: color 140ms ease, border-color 140ms ease;
}
.ts-bs-link:hover, .ts-bs-link:focus-visible {
  color: #ffffff;
  border-color: rgba(103, 232, 249, 0.42);
  outline: none;
}

/* ─── 3. Command-deck mobile menu styles ─── */
/* When the new menu is active (#ts-mobile-nav has class .ts-cmd-active), make
 * the drawer behave as a fixed visibility-driven panel — but only at <1024px. */
@media (max-width: 1023px) {
  #ts-mobile-nav.ts-cmd-active {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1000;
    visibility: hidden;
    pointer-events: none;
    height: 100dvh !important;
    max-height: none !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    transition: none;
    /* The previous CSS may set `display: none` when `hidden` attr is set;
     * forcibly override here so the panel is composited and ready. */
    display: block !important;
  }
  /* When the drawer has the `hidden` attribute removed, treat as open */
  #ts-mobile-nav.ts-cmd-active:not([hidden]) {
    visibility: visible;
    pointer-events: auto;
  }

  /* Body-scroll lock */
  body.ts-cmd-menu-open {
    overflow: hidden;
    touch-action: none;
  }
}

/* The new inner panel — markup we inject inside #ts-mobile-nav */
.ts-cmd-backdrop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.22), transparent 38%),
    radial-gradient(circle at 88% 16%, rgba(139, 92, 246, 0.18), transparent 34%),
    rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 120ms ease;
  will-change: opacity;
}
#ts-mobile-nav.ts-cmd-active:not([hidden]) .ts-cmd-backdrop { opacity: 1; }

.ts-cmd-panel {
  position: fixed;
  inset: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.96)),
    radial-gradient(circle at top left, rgba(103, 232, 249, 0.16), transparent 38%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-6px);
  opacity: 0;
  transition: transform 140ms cubic-bezier(.2, .8, .2, 1), opacity 100ms ease;
  will-change: transform, opacity;
}
#ts-mobile-nav.ts-cmd-active:not([hidden]) .ts-cmd-panel {
  transform: translateY(0);
  opacity: 1;
}

.ts-cmd-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.ts-cmd-sheen {
  position: absolute;
  left: 18px; right: 18px; top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #67e8f9, #8b5cf6, transparent);
  opacity: 0.85;
  animation: ts-cmd-sheen 2.5s ease-in-out infinite;
}

@keyframes ts-cmd-sheen {
  0%, 100% { opacity: 0.35; transform: scaleX(0.72); }
  50%      { opacity: 1;    transform: scaleX(1); }
}

.ts-cmd-scroll {
  position: relative;
  z-index: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px;
}

.ts-cmd-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ts-cmd-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 999px;
  background: rgba(8, 47, 73, 0.36);
  color: #cffafe;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 10px;
}
.ts-cmd-kicker-dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: #67e8f9;
  box-shadow: 0 0 16px rgba(103, 232, 249, 0.92);
}

.ts-cmd-title {
  margin: 14px 0 0;
  color: #ffffff;
  font-size: 1.6rem;
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 950;
}
.ts-cmd-copy {
  margin: 8px 0 0;
  max-width: 29rem;
  color: #cbd5e1;
  font-size: 0.94rem;
  line-height: 1.55;
}

.ts-cmd-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #e2e8f0;
  cursor: pointer;
  line-height: 0;
}
.ts-cmd-close svg {
  display: block;
}
.ts-cmd-close:hover, .ts-cmd-close:focus-visible {
  border-color: rgba(103, 232, 249, 0.55);
  background: rgba(30, 41, 59, 0.95);
  outline: none;
}

.ts-cmd-chips {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 1px;
  -webkit-overflow-scrolling: touch;
}
.ts-cmd-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  padding: 0 9px;
  white-space: nowrap;
}

.ts-cmd-primary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
}
.ts-cmd-primary-card {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 112px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.62)),
    radial-gradient(circle at 12% 0%, rgba(103, 232, 249, 0.18), transparent 42%);
  color: #f8fafc;
  text-decoration: none;
  padding: 16px;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.ts-cmd-primary-card.ts-cmd-primary-violet {
  background:
    linear-gradient(135deg, #c4b5fd 0%, #a78bfa 55%, #c084fc 100%);
  border-color: rgba(91, 33, 182, 0.45);
  box-shadow:
    0 10px 28px rgba(139, 92, 246, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.ts-cmd-primary-card.ts-cmd-primary-violet .ts-cmd-card-title {
  color: #1e1b4b;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.30);
}
.ts-cmd-primary-card.ts-cmd-primary-violet .ts-cmd-card-copy {
  color: #312e81;
}
.ts-cmd-primary-card.ts-cmd-primary-violet:hover,
.ts-cmd-primary-card.ts-cmd-primary-violet:focus-visible {
  border-color: rgba(76, 29, 149, 0.75);
  box-shadow:
    0 16px 38px rgba(139, 92, 246, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.ts-cmd-primary-card:hover, .ts-cmd-primary-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(103, 232, 249, 0.5);
  box-shadow: 0 18px 42px rgba(8, 47, 73, 0.34);
  outline: none;
}
.ts-cmd-card-eyebrow {
  color: #67e8f9;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.ts-cmd-primary-violet .ts-cmd-card-eyebrow { color: #4c1d95; }
.ts-cmd-card-title {
  margin-top: 7px;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 950;
}
.ts-cmd-card-copy {
  margin-top: 5px;
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.45;
}

.ts-cmd-enterprise {
  margin-top: 16px;
  border: 1px solid rgba(139, 92, 246, 0.24);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(49, 46, 129, 0.24), rgba(15, 23, 42, 0.84)),
    radial-gradient(circle at top right, rgba(103, 232, 249, 0.13), transparent 38%);
  padding: 14px;
}
.ts-cmd-ent-eyebrow {
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.ts-cmd-ent-copy {
  margin: 4px 0 10px;
  color: #cbd5e1;
  font-size: 0.78rem;
  line-height: 1.45;
}

.ts-cmd-ent-link, .ts-cmd-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  min-height: 50px;
  border-radius: 16px;
  color: #f8fafc;
  text-decoration: none;
  padding: 11px;
}
.ts-cmd-ent-link:hover, .ts-cmd-ent-link:focus-visible,
.ts-cmd-link:hover, .ts-cmd-link:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}
.ts-cmd-ent-icon {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: 0 0 34px;
  border-radius: 12px;
  border: 1px solid rgba(103, 232, 249, 0.22);
  background: rgba(103, 232, 249, 0.11);
  color: #67e8f9;
}
.ts-cmd-link-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 850;
}
.ts-cmd-link-sub {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-size: 0.74rem;
  line-height: 1.35;
}

.ts-cmd-explore { margin-top: 16px; }
.ts-cmd-explore-label {
  margin-bottom: 8px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.ts-cmd-explore-grid {
  display: grid;
  gap: 8px;
}
.ts-cmd-link {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.62);
}
.ts-cmd-arrow {
  color: #67e8f9;
  font-weight: 900;
}

.ts-cmd-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin-top: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fafc, #cbd5e1);
  color: #020617;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 18px 44px rgba(148, 163, 184, 0.18);
  transition: transform 140ms ease;
}
.ts-cmd-demo:hover, .ts-cmd-demo:focus-visible {
  transform: translateY(-1px);
  outline: none;
}
.ts-cmd-email {
  display: block;
  margin-top: 11px;
  min-height: 44px;
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 750;
  text-align: center;
  text-decoration: underline;
  text-decoration-color: rgba(148, 163, 184, 0.55);
  text-underline-offset: 4px;
  padding: 11px 0;
}
.ts-cmd-tagline {
  margin-top: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.48);
  color: #94a3b8;
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 13px;
}

@media (max-width: 520px) {
  .ts-cmd-panel { inset: 8px; border-radius: 24px; }
  .ts-cmd-scroll { padding: 15px; }
  .ts-cmd-title { font-size: 1.42rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ts-cmd-sheen { animation: none !important; }
  .ts-cmd-backdrop, .ts-cmd-panel, .ts-cmd-primary-card, .ts-cmd-demo {
    transition: none !important;
  }
  .ts-cmd-primary-card:hover, .ts-cmd-demo:hover {
    transform: none !important;
  }
}
