/* Client switcher (board 10). A centered command palette on frosted glass.
   Controls keep the 6px radius. Secondary text on the glass panel uses
   --glass-text-2 for contrast (handoff finding 1). */

.sw-overlay { position: fixed; inset: 0; z-index: 95; display: flex; align-items: flex-start; justify-content: center; padding: 10vh 24px 24px; }
.sw-backdrop { position: absolute; inset: 0; background: rgba(17, 17, 17, .34); animation: sw-fade .2s var(--ease-out); }
@keyframes sw-fade { from { opacity: 0; } }

.sw-panel {
  position: relative;
  width: min(640px, 100%);
  max-height: 76vh;
  display: flex; flex-direction: column;
  border-radius: var(--radius);
  box-shadow: var(--glass-edge), 0 40px 90px -34px rgba(26, 26, 26, .55);
  animation: sw-rise .22s var(--ease-out);
  overflow: hidden;
}
@keyframes sw-rise { from { opacity: 0; transform: translateY(-10px) scale(.99); } }

/* ---- Search ----------------------------------------------------------- */
.sw-search { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--rule); flex-shrink: 0; }
.sw-search__icon { display: flex; color: var(--glass-text-2); }
.sw-search__icon svg { stroke: currentColor; }
.sw-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text); }
.sw-input::placeholder { color: var(--glass-text-2); }

kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 4px; background: var(--tone-2); color: var(--glass-text-2);
  font: inherit; font-size: 11px; font-weight: 600; line-height: 1;
}
.sw-esc { flex-shrink: 0; }

/* ---- Body ------------------------------------------------------------- */
.sw-body { flex: 1; overflow-y: auto; padding: 8px; }
.sw-sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 10px 6px; }
.sw-sechead .micro { color: var(--glass-text-2); }
.sw-count { font-size: 12px; color: var(--glass-text-2); }
.sw-letter { padding: 10px 10px 4px; font-size: 12px; font-weight: 700; color: var(--text-quiet); }

.sw-row {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 9px 10px; border-radius: var(--radius);
  cursor: pointer; text-align: left; scroll-margin: 10px;
}
.sw-row.is-sel { background: var(--tone-1); }
.sw-ava {
  width: 38px; height: 38px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius); background: var(--inverse-bg); color: var(--inverse-text);
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.sw-row.is-current .sw-ava { box-shadow: 0 0 0 2px var(--red); }
.sw-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sw-row__name { font-size: 15px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-row__meta { font-size: 13px; color: var(--glass-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-tag { flex-shrink: 0; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--glass-text-2); background: var(--tone-2); padding: 2px 6px; border-radius: 4px; }

.sw-pin {
  flex-shrink: 0; width: 32px; height: 32px; border: 0; border-radius: var(--radius);
  background: transparent; color: var(--glass-text-2); cursor: pointer; opacity: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--t-hover) var(--ease-out), color var(--t-hover) var(--ease-out), opacity var(--t-hover) var(--ease-out);
}
.sw-pin svg { stroke: currentColor; }
.sw-pin:hover { background: var(--tone-2); color: var(--text); }
.sw-row:hover .sw-pin, .sw-row.is-sel .sw-pin { opacity: 1; }
.sw-pin.is-on { opacity: 1; color: var(--red-text); }

.sw-enter { flex-shrink: 0; opacity: 0; }
.sw-row.is-sel .sw-enter { opacity: 1; }
.sw-row.is-sel:hover .sw-pin { opacity: 1; }

.sw-empty { margin: 0; padding: 16px 10px; font-size: 14px; color: var(--glass-text-2); }
.sw-archnote { margin: 0; padding: 14px 10px; font-size: 13px; color: var(--glass-text-2); }
.sw-showit { border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sw-showit:hover { color: var(--red-text); }

/* ---- Footer ----------------------------------------------------------- */
.sw-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--rule); flex-shrink: 0; flex-wrap: wrap; }
.sw-hints { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sw-hint { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--glass-text-2); }
.sw-arch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; white-space: nowrap; }
.sw-arch input { width: 16px; height: 16px; accent-color: var(--red); cursor: pointer; }

@media (max-width: 560px) {
  .sw-overlay { padding: 6vh 12px 12px; }
  .sw-hint--k { display: none; }
}
