/* Quick interface switcher: shared by every full UI flavor tree. */
.ui-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.ui-switcher-trigger {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--app-border-soft);
  border-radius: var(--radius-md, 10px);
  background: var(--app-surface);
  color: var(--app-text-soft);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}
.ui-switcher-trigger:hover,
.ui-switcher-trigger.active {
  background: var(--app-surface-alt);
  border-color: var(--app-border);
  color: var(--app-text);
}
.ui-switcher-trigger:focus-visible {
  box-shadow: var(--brand-glow, 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent));
}
.ui-switcher.compact .ui-switcher-trigger {
  width: 36px;
  height: 36px;
}
.ui-switcher-menu {
  position: fixed;
  left: 12px;
  right: auto;
  top: auto;
  bottom: auto;
  z-index: 80;
  width: min(320px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 96px));
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg, 14px);
  background: var(--app-surface);
  box-shadow: var(--shadow-xl, 0 16px 40px rgba(0,0,0,.14));
}
.ui-switcher-menu.ui-switcher-splitter {
  width: min(680px, calc(100vw - 24px));
  max-height: min(640px, calc(100vh - 96px));
  overflow: hidden;
}
.ui-switcher-menu.drop-up {
  bottom: 96px;
}
.ui-switcher-menu.drop-down {
  top: 58px;
}
.ui-switcher.compact .ui-switcher-menu {
  position: fixed;
  top: 58px;
  right: 12px;
  left: auto;
  bottom: auto;
}
.ui-switcher-menu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 8px 10px;
  border-bottom: 1px solid var(--app-border-soft);
  margin-bottom: 6px;
  color: var(--app-text);
  font-size: var(--text-sm, 14px);
  font-weight: 800;
}
.ui-switcher-menu-head small {
  color: var(--app-text-soft);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  max-width: 150px;
}
.ui-switcher-empty {
  padding: 12px 8px;
  color: var(--app-text-soft);
  font-size: var(--text-sm, 14px);
}
.ui-switcher-split-body {
  display: grid;
  grid-template-columns: minmax(210px, 240px) minmax(0, 1fr);
  gap: 8px;
  min-height: 360px;
}
.ui-switcher-list {
  min-width: 0;
  max-height: min(510px, calc(100vh - 178px));
  overflow-y: auto;
  padding-right: 4px;
  border-right: 1px solid var(--app-border-soft);
}
.ui-switcher-option {
  width: 100%;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: flex-start;
  padding: 9px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-md, 10px);
  background: transparent;
  color: var(--app-text);
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.ui-switcher-option:hover:not(:disabled) {
  background: var(--app-surface-alt);
  border-color: var(--app-border-soft);
}
.ui-switcher-option.focused:not(.active) {
  background: var(--app-surface-alt);
  border-color: var(--app-border-soft);
}
.ui-switcher-option.active {
  background: var(--brand-light);
  border-color: var(--brand);
}
.ui-switcher-option.busy,
.ui-switcher-option:disabled {
  opacity: .62;
  cursor: wait;
}
.ui-switcher-option-mark {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}
.ui-switcher-option-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ui-switcher-option-name {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--app-text);
}
.ui-switcher-option-blurb {
  font-size: 11px;
  line-height: 1.35;
  color: var(--app-text-soft);
}
.ui-switcher-preview {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 2px 2px 2px 10px;
}
.ui-switcher-preview-frame {
  overflow: hidden;
  border: 1px solid var(--app-border-soft);
  border-radius: var(--radius-md, 10px);
  background: var(--app-surface-alt);
  aspect-ratio: 16 / 10;
}
.ui-switcher-preview-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
}
.ui-switcher-preview-copy {
  min-width: 0;
}
.ui-switcher-preview-kicker {
  margin-bottom: 4px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}
.ui-switcher-preview-name {
  color: var(--app-text);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.2;
}
.ui-switcher-preview-copy p {
  margin: 6px 0 0;
  color: var(--app-text-soft);
  font-size: 13px;
  line-height: 1.45;
}
.ui-switcher-preview-action {
  width: 100%;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-md, 10px);
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: filter 120ms ease, opacity 120ms ease;
}
.ui-switcher-preview-action:hover:not(:disabled) {
  filter: brightness(.96);
}
.ui-switcher-preview-action:disabled {
  border-color: var(--app-border-soft);
  background: var(--app-surface-alt);
  color: var(--app-text-soft);
  cursor: default;
}
@media (max-width: 480px) {
  .ui-switcher-menu {
    width: calc(100vw - 20px);
    right: 10px;
  }
  .ui-switcher-menu.ui-switcher-splitter {
    overflow-y: auto;
  }
  .ui-switcher-split-body {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .ui-switcher-list {
    max-height: 260px;
    border-right: 0;
    border-bottom: 1px solid var(--app-border-soft);
    padding-right: 0;
    padding-bottom: 8px;
  }
  .ui-switcher-preview {
    padding: 2px 0 0;
  }
}
