/* ============================================================
   Store switcher (top-bar dropdown) — active store + switch list.
   Mirrors the profile dropdown chrome; uses logical properties so
   it flips cleanly under RTL.
   ============================================================ */

.store-switcher { position: relative; }

.store-switcher-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px;
  padding-inline: 8px 10px;
  border-radius: 9px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  transition: background 120ms ease, border-color 120ms ease;
}
.store-switcher-btn:hover,
.store-switcher-btn.is-open {
  background: var(--bg-hover);
  border-color: var(--border-default);
}
.store-switcher-icon { display: inline-flex; color: var(--text-tertiary); }
.store-switcher-meta { text-align: start; line-height: 1.2; }
.store-switcher-label { display: block; font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .04em; }
.store-switcher-name { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-primary); max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 960px) {
  .store-switcher-meta,
  .store-switcher-chev { display: none; }
  .store-switcher-btn { padding-inline: 8px; }
}

.store-switcher-panel {
  position: absolute;
  top: calc(100% + 6px); inset-inline-end: 0;
  width: min(280px, calc(100vw - 24px));
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-pop);
  z-index: 60;
  overflow: hidden;
  padding: 6px;
}

@media (max-width: 1023px) {
  .store-switcher-panel {
    position: fixed !important;
    top: 64px !important;
    inset-inline-start: 12px !important;
    inset-inline-end: 12px !important;
    width: auto !important;
    max-height: calc(100vh - 80px) !important;
  }
}

.store-switcher-panel-head {
  padding: 6px 10px 4px;
  color: var(--text-tertiary);
}

.store-switcher-list { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; }
.store-switcher-list form { margin: 0; }

.store-switcher-item { height: auto; padding-block: 8px; }
.store-switcher-item.is-active { background: var(--bg-hover); cursor: default; }
.store-switcher-item:disabled { opacity: 1; }
.store-switcher-item-id { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.store-switcher-item-name { font-size: 13px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-switcher-item-code { font-size: 11px; color: var(--text-tertiary); }

.store-switcher-panel-sep { height: 1px; background: var(--border-subtle); margin: 6px 4px; }
