/* Shared suite chrome heights — keep sub-nav sticky offset in sync with primary nav */
:root {
  --suite-nav-h: 48px;
  --suite-subnav-h: 36px;
  --suite-chrome-h: calc(var(--suite-nav-h) + var(--suite-subnav-h) + 1px); /* +1 border */
}

/* Shared suite nav — wordmark matches page brand mark (home-brand__mark) */
.suite-nav__wordmark {
  font-size: 17px;
  font-weight: 800;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.015em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.suite-nav__signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
/* display:inline-flex above beats the UA [hidden] rule — keep guests-only CTA actually hidden when logged in */
.suite-nav__signin[hidden] {
  display: none !important;
}
.suite-nav__signin:hover {
  background: #1d4ed8;
  color: #fff;
  text-decoration: none;
}

/* Authenticated Sign out — muted so it sits quietly beside the admin gear */
.suite-nav__signout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.suite-nav__signout:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

/* Shared suite sub-nav — secondary row; type matches primary nav zones */
.suite-subnav {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: var(--suite-nav-h, 48px);
  z-index: 65;
}
.suite-subnav__inner {
  /* Full-bleed — page content is not max-width centered, so neither is sub-nav */
  padding: 0 var(--s5, 20px);
  display: flex;
  gap: var(--s5, 20px);
  align-items: center;
  height: var(--suite-subnav-h, 36px);
  overflow-x: auto;
  scrollbar-width: none;
}
.suite-subnav__inner::-webkit-scrollbar { display: none; }
.suite-subnav__link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--t-meta, 12px);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}
.suite-subnav__link:hover { color: var(--ink); text-decoration: none; }
.suite-subnav__link--active { color: var(--brand); border-bottom-color: var(--brand); }

/* Hide admin gear before paint when head script sets this class (op_superadmin=0). */
html.op-hide-admin-gear .suite-nav__admin {
  display: none !important;
}

/* Free accounts: one Tools menu instead of a pill per tool.
   Paid tools stay visible and labelled, and are not links. */
html.op-case-builder-only .suite-nav__zones > .suite-nav__zone {
  display: none !important;
}
html.op-case-builder-only .suite-nav__zones {
  overflow: visible;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}
.suite-product { position: relative; }
.suite-product__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: var(--t-meta, 12px);
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.suite-product__trigger:hover,
.suite-product.is-open > .suite-product__trigger {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.suite-product__trigger svg {
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}
.suite-product.is-open > .suite-product__trigger svg {
  transform: rotate(180deg);
}
.suite-product__panel {
  display: none;
  position: absolute;
  /* Flush with the button. The top padding is the visual gap and stays hoverable, so moving the pointer down does not close the menu. */
  top: 100%;
  left: 0;
  box-sizing: border-box;
  width: min(340px, calc(100vw - 16px));
  padding-top: 8px;
  z-index: 80;
}
.suite-product.is-open > .suite-product__panel {
  display: block;
}
.suite-product__list {
  display: grid;
  gap: 2px;
  max-height: calc(100dvh - 72px);
  overflow-y: auto;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}
.suite-product__rule {
  height: 1px;
  margin: 6px 10px;
  background: #e2e8f0;
}
.suite-product__item {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  text-align: left;
}
a.suite-product__item:hover {
  background: #eff6ff;
  text-decoration: none;
}
.suite-product__item.is-current {
  background: #eff6ff;
}
.suite-product__title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
}
.suite-product__item.is-current .suite-product__title {
  color: #1d4ed8;
}
.suite-product__blurb {
  font-size: 0.8rem;
  font-weight: 400;
  color: #64748b;
  line-height: 1.35;
}
.suite-product__item--paid {
  cursor: default;
}
.suite-product__item--paid .suite-product__title,
.suite-product__item--paid .suite-product__blurb {
  color: #94a3b8;
}
.suite-product__badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
}

/* Shared mobile suite nav — canonical sizing from devices page */
@media (max-width: 900px) {
  .suite-nav {
    gap: 4px;
    padding: 0 8px;
    padding-right: 36px; /* reserve space for absolutely positioned gear */
    position: sticky;
  }
  html.op-hide-admin-gear .suite-nav,
  html.op-case-builder-only .suite-nav {
    padding-right: 8px;
  }
  .suite-nav__brand { flex-shrink: 0; }
  .suite-nav__wordmark { font-size: 17px; }
  .suite-nav__spacer { display: none; }
  .suite-nav__zones {
    display: flex;
    flex: 1 1 0%;
    min-width: 0;
    width: 0;
    overflow: visible;
  }
  .suite-nav__zone-long { display: none; }
  .suite-nav__zone-short { display: inline; }
  .suite-nav__zone {
    flex: 1 1 0%;
    min-width: 0;
    padding: 4px 2px;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
  }
  .suite-nav__case:empty { display: none; }
  .suite-nav__case { flex-shrink: 0; }
  .suite-nav__admin {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
  }
  .suite-nav__signout {
    height: 24px;
    padding: 0 8px;
    font-size: 11px;
    margin-right: 2px;
  }
  :root { --suite-subnav-h: 32px; }
  .suite-subnav__inner { padding: 0 var(--s3, 12px); gap: var(--s4, 16px); }
  .suite-subnav__link { font-size: 11px; }
}

/* Match home-brand__title mobile size (index.html @ 1024px) */
@media (min-width: 901px) and (max-width: 1024px) {
  .suite-nav__wordmark { font-size: 16px; }
}
