/* NEX-629: section navigation on the public landing pages (index, buyers,
   suppliers), driven by public/js/section-rail.js.

   Wide screens get the same dot-and-label rail as the RFQ and quote pages.
   Narrower screens get a chip bar pinned under the sticky header. The switch
   is at 1360px rather than the dashboard's 1280px: landing content runs to
   1040px wide, and at 1280px the rail's labels would reach into it. */

.right-rail-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* NEX-630: a dark frosted panel so the labels read over the hero photos. */
  padding: 10px 14px 10px 12px;
  border-radius: 12px;
  background: rgba(10, 12, 18, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.right-rail-nav[hidden],
.right-rail-nav .rail-item[hidden] { display: none; }

.right-rail-nav .rail-line {
  position: absolute;
  left: 17px;
  top: 16px;
  bottom: 16px;
  width: 1px;
  background: var(--color-secondary);
  opacity: 0.4;
}

.right-rail-nav .rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  position: relative;
  text-decoration: none;
}
.right-rail-nav .rail-item--gap { margin-top: 10px; }

.right-rail-nav .rail-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--color-muted);
  background: var(--color-bg);
  flex-shrink: 0;
  box-sizing: border-box;
  transition: background 200ms ease, border-color 200ms ease;
}
.right-rail-nav .rail-item.active .rail-dot {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.right-rail-nav .rail-label {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 200ms ease;
}
.right-rail-nav .rail-item:hover .rail-label,
.right-rail-nav .rail-item.active .rail-label {
  color: var(--color-text);
}
.right-rail-nav .rail-item.active .rail-label { font-weight: 600; }
.right-rail-nav .rail-item:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 4px; }

/* Chip bar: pinned directly under the sticky header. --landing-header-h is set
   by the page script from the header's real height. */
.section-chips {
  position: sticky;
  top: var(--landing-header-h, 72px);
  z-index: 90;
  display: none;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 16px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.section-chips::-webkit-scrollbar { display: none; }
.section-chip {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  white-space: nowrap;
}
.section-chip.active {
  color: var(--color-on-accent);
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.section-chip[hidden] { display: none; }
.section-chip:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

@media (max-width: 1359px) {
  .right-rail-nav { display: none; }
  .section-chips { display: flex; }
  .section-chips[hidden] { display: none; }
}
