/* ---------------------------------------------------------------------------
 * sx-nav-actions.css
 * Top-bar enhancements for the Sigrix shell:
 *   - v2 (guest):  in-nav shopping cart button + popover
 *   - v3 (signed): credits chip, redesigned notifications popover,
 *                  Publish CTA, and user "pill" with stats dropdown.
 * Sourced from Sigrix Marketplace v2 / v3 design prototypes.
 * --------------------------------------------------------------------------- */

/* ---------- v3 nav refinements (apply on top of base sx-nav) ---------- */
.sx-nav .sx-nav-inner { gap: 20px; }
.sx-nav .sx-nav-actions { gap: 6px; }

/* sign-in text link (v3 guest) */
.sx-nav-link--auth {
  height: 34px; padding: 0 12px;
  display: inline-flex; align-items: center;
  font-size: 13.5px; color: var(--sx-text-2);
  border-radius: 8px;
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: color 140ms ease;
}
.sx-nav-link--auth:hover { color: var(--sx-text); background: transparent; }

/* ---------- Anchor for popovers ---------- */
.sx-nav-anchor { position: relative; display: inline-flex; }

/* ---------- Cart button + popover (v2) ---------- */
.mp-cart-btn {
  position: relative;
  width: 36px; height: 36px;
  min-height: 0;
  border-radius: var(--sx-r-md);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--sx-text);
  background: var(--sx-surface);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
  border: 0;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
  transition: background 120ms ease, box-shadow 120ms ease, color 120ms ease;
}
.mp-cart-btn:hover { box-shadow: 0 0 0 1px var(--sx-line-2) inset; background: var(--sx-surface-2); }
.mp-cart-btn:focus-visible { outline: 2px solid var(--sx-brand); outline-offset: 2px; }
.mp-cart-btn[aria-expanded="true"] {
  background: var(--sx-surface-2);
  box-shadow: 0 0 0 1px var(--sx-line-2) inset;
}
.mp-cart-btn-badge {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--sx-brand);
  color: var(--sx-brand-ink, #fff);
  font-family: var(--sx-font-mono);
  font-size: 10px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--sx-bg);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  transition: transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mp-cart-btn-badge--bump { transform: scale(1.35); }
.mp-cart-btn-badge.hidden { display: none !important; }

.mp-cart-anchor { position: relative; display: inline-flex; }

.mp-cart-pop {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 380px;
  background: var(--sx-surface);
  border-radius: var(--sx-r-lg);
  box-shadow:
    0 0 0 1px var(--sx-line) inset,
    0 24px 48px -16px rgba(0,0,0,0.6),
    0 8px 16px -8px rgba(0,0,0,0.4);
  overflow: hidden;
  z-index: 50;
  transform-origin: top right;
  animation: mp-cart-pop-in 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.mp-cart-pop.hidden { display: none !important; }
[data-theme="light"] .mp-cart-pop {
  box-shadow:
    0 0 0 1px var(--sx-line) inset,
    0 24px 48px -16px rgba(14,19,32,0.18),
    0 8px 16px -8px rgba(14,19,32,0.10);
}
@keyframes mp-cart-pop-in {
  from { opacity: 0; transform: scale(0.96) translateY(-6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.mp-cart-pop::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 14px;
  width: 12px; height: 12px;
  background: var(--sx-surface);
  transform: rotate(45deg);
  box-shadow: -1px -1px 0 0 var(--sx-line);
  z-index: 0;
}

.mp-cart-head {
  padding: 14px 16px 12px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--sx-line);
  position: relative;
  z-index: 1;
}
.mp-cart-head h3 {
  font-size: 13px; font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  display: inline-flex; align-items: baseline; gap: 8px;
  color: var(--sx-text);
}
.mp-cart-head .count {
  font-family: var(--sx-font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--sx-text-3);
  letter-spacing: 0.02em;
}
.mp-cart-head-close {
  width: 24px; height: 24px;
  min-height: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--sx-text-3);
  cursor: pointer;
  padding: 0;
  transition: color 120ms, background 120ms;
}
.mp-cart-head-close:hover { color: var(--sx-text); background: var(--sx-surface-2); }

.mp-cart-list {
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--sx-line) transparent;
}
.mp-cart-list::-webkit-scrollbar { width: 6px; }
.mp-cart-list::-webkit-scrollbar-thumb { background: var(--sx-line); border-radius: 3px; }

.mp-cart-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--sx-line);
  align-items: center;
  transition: background 200ms ease;
}
.mp-cart-item:last-child { border-bottom: 0; }
.mp-cart-item--just-added {
  animation: mp-cart-flash 1400ms ease-out;
}
@keyframes mp-cart-flash {
  0%   { background: rgba(91,124,255,0.18); }
  100% { background: transparent; }
}

.mp-cart-thumb {
  width: 44px; height: 44px;
  border-radius: var(--sx-r-sm);
  overflow: hidden;
  background: linear-gradient(135deg, #1B2230 0%, #131722 100%);
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--sx-line) inset;
}
[data-theme="light"] .mp-cart-thumb {
  background: linear-gradient(135deg, #EEF1F8 0%, #F7F8FB 100%);
}
.mp-cart-thumb-letter {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sx-font-display);
  font-weight: 600;
  font-size: 18px;
  color: rgba(255,255,255,0.85);
  z-index: 1;
}
[data-theme="light"] .mp-cart-thumb-letter { color: rgba(14,19,32,0.7); }
.mp-cart-thumb::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 8px 8px;
}
[data-theme="light"] .mp-cart-thumb::after {
  background-image:
    linear-gradient(to right, rgba(14,19,32,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14,19,32,0.04) 1px, transparent 1px);
}
.mp-cart-thumb-tag {
  position: absolute; top: 4px; left: 4px;
  width: 6px; height: 6px; border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.4);
}
.mp-cart-thumb-tag--prompt    { background: #5B7CFF; }
.mp-cart-thumb-tag--persona   { background: #F5B454; }
.mp-cart-thumb-tag--agent     { background: #7CE3D4; }
.mp-cart-thumb-tag--assistant { background: #B48CFF; }
.mp-cart-thumb-tag--product   { background: #F47B7B; }

.mp-cart-info { min-width: 0; }
.mp-cart-info-title {
  font-size: 13px; font-weight: 500;
  color: var(--sx-text);
  letter-spacing: -0.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
.mp-cart-info-meta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 3px;
  font-size: 11px;
  color: var(--sx-text-3);
}
.mp-cart-info-meta .type { text-transform: capitalize; font-weight: 500; }
.mp-cart-info-meta .sep { opacity: 0.5; }

.mp-cart-side {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.mp-cart-price {
  font-family: var(--sx-font-mono);
  font-size: 12px; font-weight: 500;
  color: var(--sx-text);
  letter-spacing: -0.01em;
}
.mp-cart-price--free { color: var(--sx-ok); }
.mp-cart-remove {
  width: 20px; height: 20px;
  min-height: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--sx-text-3);
  cursor: pointer;
  padding: 0;
  transition: color 120ms, background 120ms;
}
.mp-cart-remove:hover { color: var(--sx-danger); background: var(--sx-surface-2); }

.mp-cart-summary {
  padding: 12px 16px;
  border-top: 1px solid var(--sx-line);
  background: var(--sx-surface-2);
  display: grid; gap: 6px;
}
.mp-cart-summary-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px;
  color: var(--sx-text-2);
}
.mp-cart-summary-row .num {
  font-family: var(--sx-font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.mp-cart-summary-row--total {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--sx-line);
  font-size: 14px;
  color: var(--sx-text);
  font-weight: 600;
}
.mp-cart-summary-row--total .num { font-size: 15px; font-weight: 600; }

.mp-cart-actions {
  padding: 12px 16px 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
}
.mp-cart-actions .sx-btn { height: 38px; }
.mp-cart-actions .sx-btn--primary { justify-content: center; }

.mp-cart-empty {
  padding: 36px 20px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.mp-cart-empty-icon {
  width: 44px; height: 44px;
  flex: 0 0 44px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  margin: 0 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--sx-surface-2);
  color: var(--sx-text-3);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
}
.mp-cart-empty h4 { font-size: 14px; font-weight: 600; margin: 0 0 4px; color: var(--sx-text); text-align: center; }
.mp-cart-empty p  { font-size: 12px; color: var(--sx-text-3); line-height: 1.5; max-width: 28ch; margin: 0 auto; text-align: center; }

.mp-cart-tip {
  padding: 9px 16px;
  font-size: 11px;
  color: var(--sx-text-3);
  letter-spacing: 0.01em;
  background: var(--sx-bg);
  border-top: 1px solid var(--sx-line);
  display: flex; align-items: center; gap: 8px;
}
.mp-cart-tip svg { color: var(--sx-accent); flex-shrink: 0; }

/* Toast when cart is closed and an item was added */
.mp-cart-toast {
  position: fixed;
  top: 74px;
  right: 32px;
  background: var(--sx-surface);
  border-radius: var(--sx-r-md);
  box-shadow:
    0 0 0 1px var(--sx-line) inset,
    0 12px 28px -10px rgba(0,0,0,0.5);
  padding: 10px 12px;
  display: inline-flex; align-items: center; gap: 10px;
  z-index: 60;
  font-size: 13px;
  animation: mp-toast-in 240ms cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 340px;
}
[data-theme="light"] .mp-cart-toast {
  box-shadow:
    0 0 0 1px var(--sx-line) inset,
    0 12px 28px -10px rgba(14,19,32,0.18);
}
.mp-cart-toast.hidden { display: none !important; }
@keyframes mp-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mp-cart-toast-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(110,231,161,0.16);
  color: var(--sx-ok);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(110,231,161,0.30) inset;
}
.mp-cart-toast-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mp-cart-toast-text strong {
  font-size: 12px; font-weight: 600; color: var(--sx-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 220px;
}
.mp-cart-toast-text span { font-size: 11px; color: var(--sx-text-3); }
.mp-cart-toast-view {
  font-size: 12px; font-weight: 500; color: var(--sx-brand);
  margin-left: 4px;
  white-space: nowrap;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
}
.mp-cart-toast-view:hover { background: var(--sx-surface-2); }


/* ---------- Credits chip (v3) ---------- */
.sx-nav-credits {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 11px 0 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(124,227,212,0.10), rgba(124,227,212,0.04));
  box-shadow: 0 0 0 1px rgba(124,227,212,0.22) inset;
  color: var(--sx-text);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition: box-shadow 140ms ease, background 140ms ease;
}
.sx-nav-credits svg { color: var(--sx-accent); flex-shrink: 0; }
.sx-nav-credits .num { font-family: var(--sx-font-mono); font-variant-numeric: tabular-nums; }
.sx-nav-credits .lbl { color: var(--sx-text-3); font-size: 11.5px; }
.sx-nav-credits:hover {
  box-shadow: 0 0 0 1px rgba(124,227,212,0.40) inset;
  background: linear-gradient(180deg, rgba(124,227,212,0.14), rgba(124,227,212,0.06));
}

/* Disabled "coming soon" state — see sx_nav.html credits chip. */
.sx-nav-credits--disabled,
.sx-nav-credits--disabled:hover {
  cursor: not-allowed;
  pointer-events: auto;
  opacity: 0.55;
  filter: grayscale(0.85);
  background: linear-gradient(180deg, rgba(140,148,160,0.10), rgba(140,148,160,0.04));
  box-shadow: 0 0 0 1px rgba(140,148,160,0.25) inset;
  color: var(--sx-text-3);
}
.sx-nav-credits--disabled svg { color: var(--sx-text-3); }
.sx-nav-credits-soon {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(140,148,160,0.18);
  color: var(--sx-text-3);
  margin-left: 2px;
}

/* ---------- Notifications icon (v3) ---------- */
.sx-nav-icon {
  position: relative;
  width: 34px; height: 34px;
  min-height: 0;
  border: 0;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--sx-text-2);
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}
.sx-nav-icon:hover { background: var(--sx-surface); color: var(--sx-text); }
.sx-nav-icon[aria-expanded="true"],
.sx-nav-icon.is-open {
  background: var(--sx-surface);
  color: var(--sx-text);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
}
.sx-nav-icon-dot {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px;
  background: var(--sx-danger);
  color: #fff;
  font-family: var(--sx-font-mono);
  font-size: 9.5px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--sx-bg);
  font-variant-numeric: tabular-nums;
}
.sx-nav-icon-dot.hidden { display: none !important; }

/* ---------- Publish CTA (v3) ---------- */
.sx-nav-publish {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px 0 10px;
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--sx-text);
  background: var(--sx-surface);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
  text-decoration: none;
  transition: background 140ms ease, box-shadow 140ms ease;
  margin-left: 2px;
}
.sx-nav-publish:hover { background: var(--sx-surface-2); box-shadow: 0 0 0 1px var(--sx-line-2) inset; }
.sx-nav-publish svg { color: var(--sx-text-3); }

/* ---------- User pill (v3) ---------- */
.sx-nav-user {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 3px 10px 3px 3px;
  border-radius: 999px;
  background: var(--sx-surface);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
  color: var(--sx-text);
  cursor: pointer;
  margin-left: 4px;
  border: 0;
  font: inherit;
  transition: background 140ms ease, box-shadow 140ms ease;
}
.sx-nav-user:hover {
  background: var(--sx-surface-2);
  box-shadow: 0 0 0 1px var(--sx-line-2) inset;
}
.sx-nav-user[aria-expanded="true"],
.sx-nav-user.is-open {
  background: var(--sx-surface-2);
  box-shadow: 0 0 0 1px var(--sx-line-2) inset;
}
.sx-nav-user-avatar {
  width: 28px; height: 28px;
  flex: 0 0 28px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--sx-brand) 0%, #6B82FF 100%);
  color: #fff;
  font-size: 12px; font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset;
  overflow: hidden;
}
.sx-nav-user-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.sx-nav-user-avatar.lg {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  font-size: 16px;
}
.sx-nav-user-name {
  display: flex; flex-direction: column; align-items: flex-start;
  line-height: 1.1;
}
.sx-nav-user-name .n { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.sx-nav-user-name .r { font-size: 10.5px; color: var(--sx-text-3); margin-top: 2px; letter-spacing: 0.04em; }
.sx-nav-user-chevron { transition: transform 160ms; }
.sx-nav-user[aria-expanded="true"] .sx-nav-user-chevron,
.sx-nav-user.is-open .sx-nav-user-chevron { transform: rotate(180deg); }

/* ---------- Popover panels (notifications + user menu) ---------- */
.sx-nav-pop {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  background: var(--sx-surface);
  border-radius: var(--sx-r-lg);
  box-shadow:
    0 0 0 1px var(--sx-line) inset,
    0 24px 48px -16px rgba(0,0,0,0.6),
    0 8px 16px -8px rgba(0,0,0,0.4);
  overflow: hidden;
  z-index: 60;
  transform-origin: top right;
  animation: sx-nav-pop-in 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="light"] .sx-nav-pop {
  box-shadow:
    0 0 0 1px var(--sx-line) inset,
    0 24px 48px -16px rgba(14,19,32,0.18),
    0 8px 16px -8px rgba(14,19,32,0.10);
}
.sx-nav-pop.hidden { display: none !important; }
.sx-nav-pop--user { width: 300px; }
@keyframes sx-nav-pop-in {
  from { opacity: 0; transform: scale(0.97) translateY(-6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.sx-nav-pop-head {
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--sx-line);
  font-size: 12px; font-weight: 600; color: var(--sx-text);
  letter-spacing: -0.005em;
}
.sx-nav-pop-link {
  font-size: 11px; color: var(--sx-text-3); font-weight: 500;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}
.sx-nav-pop-link:hover { color: var(--sx-text-2); }
.sx-nav-pop-body { padding: 6px; }
.sx-notif {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px;
  border-radius: var(--sx-r-md);
  text-decoration: none;
  color: inherit;
  transition: background 120ms ease;
}
.sx-notif:hover { background: var(--sx-surface-2); }
.sx-notif-dot {
  width: 6px; height: 6px; border-radius: 50%;
  margin-top: 6px; flex-shrink: 0;
  background: var(--sx-brand);
}
.sx-notif-title {
  font-size: 13px; color: var(--sx-text); line-height: 1.4;
}
.sx-notif-meta {
  font-size: 11px; color: var(--sx-text-3);
  margin-top: 2px; font-family: var(--sx-font-mono);
}
.sx-notif-empty {
  padding: 28px 18px;
  text-align: center;
  font-size: 12px; color: var(--sx-text-3);
}
.sx-nav-pop-foot {
  display: block;
  padding: 12px 16px;
  border-top: 1px solid var(--sx-line);
  font-size: 12px; font-weight: 500;
  color: var(--sx-text-2);
  text-align: center;
  text-decoration: none;
}
.sx-nav-pop-foot:hover { color: var(--sx-text); background: var(--sx-surface-2); }

/* User menu card / stats / sections */
.sx-nav-user-card {
  padding: 16px;
  display: flex; gap: 12px; align-items: center;
  border-bottom: 1px solid var(--sx-line);
  text-decoration: none;
  color: inherit;
  transition: background 120ms ease;
}
.sx-nav-user-card:hover { background: var(--sx-surface-2); }
.sx-nav-user-fullname {
  font-size: 14px; font-weight: 600; color: var(--sx-text);
  letter-spacing: -0.01em;
}
.sx-nav-user-handle {
  font-size: 12px; color: var(--sx-text-3);
  margin-top: 2px; font-family: var(--sx-font-mono);
}
.sx-nav-user-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 12px 8px;
  border-bottom: 1px solid var(--sx-line);
  text-align: center;
}
.sx-nav-user-stats > div + div { box-shadow: -1px 0 0 var(--sx-line); }
.sx-nav-user-stats .v {
  font-family: var(--sx-font-mono);
  font-size: 14px; color: var(--sx-text);
  font-weight: 500;
}
.sx-nav-user-stats .l {
  font-size: 9.5px; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sx-text-3);
  margin-top: 4px;
}
.sx-nav-pop-section {
  padding: 6px;
  border-bottom: 1px solid var(--sx-line);
}
.sx-nav-pop-section:last-child { border-bottom: 0; }
.sx-nav-pop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--sx-r-md);
  font-size: 13px; color: var(--sx-text);
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
  background: transparent;
  border: 0;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font: inherit;
}
.sx-nav-pop-item:hover { background: var(--sx-surface-2); }
.sx-nav-pop-item svg { color: var(--sx-text-3); flex-shrink: 0; }
.sx-nav-pop-item .kbd {
  margin-left: auto;
  font-family: var(--sx-font-mono);
  font-size: 11px;
  color: var(--sx-text-3);
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--sx-bg);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
}
.sx-nav-pop-item--muted { color: var(--sx-text-2); }
.sx-nav-pop-item--muted:hover { color: var(--sx-text); }

/* ---------- Hide the legacy floating cart-shell on Sigrix-shell pages
 *            (cart now lives inline in the top nav) ---------------------- */
body.sx-shell .cart-shell,
body.home-page .cart-shell,
body.hub-page  .cart-shell {
  display: none !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .sx-nav-credits .lbl { display: none; }
  .sx-nav-user-name   { display: none; }
}

@media (max-width: 720px) {
  .mp-cart-pop {
    width: calc(100vw - 24px);
    right: -8px;
  }
  .mp-cart-pop::before { right: 22px; }
  .sx-nav-publish span { display: none; }
  .sx-nav-publish { padding: 0 10px; }
}
