/* ============================================================
   Mode / layout switcher — production styles.

   Adapted from the opus nav.css but scoped with sd- prefixes so it cannot
   collide with the existing production stylesheet, and using the approved
   cream/orange tokens rather than the rejected dark palette.
   ============================================================ */

.sd-topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px clamp(16px, 4vw, 40px);
  background: var(--sd-paper, #FFF9F0);
  border-bottom: 1px solid rgba(0, 0, 0, .07);
  position: sticky;
  top: 0;
  z-index: 40;
}

.sd-brand {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -.02em;
  color: #1a1712;
  text-decoration: none;
  flex: 0 0 auto;
}
.sd-brand em { font-style: normal; color: var(--sd-accent, #FF8A3D); }

/* ---- modes (primary) ---- */
.sd-nav-modes { display: flex; gap: 4px; flex: 0 1 auto; min-width: 0; }

.sd-nav-mode {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;              /* pill controls, per the design direction */
  font: 600 .875rem/1 'Plus Jakarta Sans', system-ui, sans-serif;
  color: #5b5348;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;                  /* a11y tap target */
  transition: background .15s ease, color .15s ease;
}
.sd-nav-mode:hover { background: rgba(0, 0, 0, .045); color: #1a1712; }
.sd-nav-mode.is-active { background: #1a1712; color: #FFF9F0; }

.sd-nav-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--dot, #FFC145);
  flex: 0 0 auto;
}

/* One label on wide screens, the short form on narrow. */
.sd-nav-mode-short { display: none; }
@media (max-width: 720px) {
  .sd-nav-mode-full { display: none; }
  .sd-nav-mode-short { display: inline; }
  .sd-nav-mode { padding: 8px 11px; }
}

/* ---- layouts (secondary, only inside Escape) ---- */
.sd-nav-views-wrap {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto; min-width: 0;
}
.sd-nav-views-label {
  font: 600 .68rem/1 'Plus Jakarta Sans', system-ui, sans-serif;
  letter-spacing: .08em; text-transform: uppercase; color: #9a9081;
  white-space: nowrap;
}
.sd-nav-views {
  display: flex; gap: 2px; padding: 3px;
  background: rgba(0, 0, 0, .04); border-radius: 999px;
}
.sd-nav-view {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  font: 600 .8rem/1 'Plus Jakarta Sans', system-ui, sans-serif;
  color: #5b5348; text-decoration: none; white-space: nowrap;
  min-height: 38px;
}
.sd-nav-view:hover { background: rgba(255, 255, 255, .8); color: #1a1712; }
.sd-nav-view.is-active { background: #fff; color: #1a1712; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.sd-nav-glyph { font-size: .95em; }

@media (max-width: 560px) {
  .sd-nav-views-label { display: none; }
  .sd-nav-view { padding: 7px 10px; }
}

/* ---- watchlist ---- */
.sd-watch-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: #fff; color: #1a1712; cursor: pointer;
  font: 600 .84rem/1 'Plus Jakarta Sans', system-ui, sans-serif;
  min-height: 44px; flex: 0 0 auto;
}
.sd-watch-btn:hover { border-color: var(--sd-accent, #FF8A3D); color: var(--sd-accent, #FF8A3D); }
.sd-watch-count {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--sd-accent, #FF8A3D); color: #fff;
  font-size: .72rem; font-weight: 700;
}
@media (max-width: 480px) { .sd-watch-label { display: none; } }

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  .sd-nav-mode, .sd-nav-view { transition: none; }
}
