/* Replacing an instrument's sound (swap.js): the browser's banner in Replace mode, the rack's row
   being replaced, and the list of instruments a sound can go into. */

.swap-banner {
  margin: 0 8px 8px;
  padding: 9px 10px 8px;
  border-radius: 10px;
  border: 1px dashed var(--line-3);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.03));
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
}
.swap-head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.swap-label {
  font: 600 9.5px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.swap-name {
  font: 600 15px/1.15 var(--serif);
  color: var(--champagne);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.swap-line {
  color: var(--muted);
  line-height: 1.35;
}
.swap-from {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
}
.swap-old {
  color: var(--dim);
}
.swap-from .swap-new {
  color: var(--gold-hi);
  font-weight: 600;
}
.swap-arrow {
  color: var(--gold);
}
.swap-idle {
  color: var(--text);
}
.swap-keeps::before {
  content: "✓ ";
  color: var(--emerald);
}
.swap-drops {
  color: var(--rose);
}
.swap-drops::before {
  content: "⚠ ";
}
.swap-acts {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.swap-acts .swap-keep {
  margin-left: auto;
}
.swap-keep.off {
  opacity: 0.45;
  pointer-events: none;
}
/* The sound the instrument being replaced plays now. */
.b-now {
  margin-left: auto;
  padding: 0 5px;
  border-radius: 5px;
  border: 1px solid var(--line-3);
  color: var(--gold);
  font: 600 8.5px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex: none;
}
.b-item.pick.standin {
  outline: 1px solid var(--gold);
  outline-offset: -1px;
}

/* The rack row being replaced, and a row a sound stands in for while its list is open. */
.rack-row.replacing .ch-name,
.rack-row.standin .ch-name {
  border: 1px dashed var(--gold-hi);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.22);
}
.rack-row.replacing .ch-name,
.rack-row.standin .ch-name {
  position: relative;
  overflow: visible;
}
/* A tab on the name's top edge, so the name keeps its room. */
.ch-name .ch-swap-badge {
  position: absolute;
  top: -7px;
  right: 6px;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--gold);
  color: #1a1408;
  font: 700 8px/1.45 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

/* The list of instruments to put a sound in. */
.swap-targets {
  width: 340px;
  max-width: calc(100vw - 16px);
}
.swap-t-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: min(380px, 60vh);
  overflow-y: auto;
}
.swap-target {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 64px 54px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  text-align: left;
}
.swap-target.kit {
  padding-left: 22px;
  grid-template-columns: 10px minmax(0, 1fr) 64px 40px;
}
.swap-target.kit .swatch {
  opacity: 0.55;
  transform: scale(0.8);
}
.swap-target:hover,
.swap-target.on {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.18), rgba(212, 175, 55, 0.04));
  color: var(--gold-hi);
}
.swap-t-names {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.swap-t-name,
.swap-t-sound,
.swap-t-drops {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.swap-t-sound {
  color: var(--dim);
  font-size: 10.5px;
}
.swap-t-drops {
  color: var(--rose);
  font-size: 10px;
}
.swap-t-drops::before {
  content: "⚠ ";
}
.swap-pic {
  width: 64px;
  height: 20px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 1px var(--line);
}
.swap-t-why {
  justify-self: end;
  font: 500 9px/1.2 var(--mono);
  color: var(--gold);
  white-space: nowrap;
}
.swap-t-foot {
  margin-top: 5px;
  padding: 6px 8px 1px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font: 500 9.5px/1.2 var(--mono);
}
.kb-use .glyph {
  color: var(--gold);
}
