/* Browser panel and shared panel/field styles (browser.js). */

/* ---------------------------------------------------------------- panels */

.panel {
  background: var(--lacquer);
  border-right: 1px solid var(--line);
  min-width: 0;
  min-height: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 235, 190, 0.03), transparent);
}
.panel-title {
  font: 600 15px/1 var(--serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--champagne);
}
.panel-title em {
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--gold);
  font-size: 17px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 12px 6px;
  font: 600 9.5px/1 var(--sans);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-left: 10px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}
.section-title .btn {
  order: 2;
  margin-left: 6px;
}

/* ---------------------------------------------------------------- browser */

.browser {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.browser-body {
  overflow: auto;
  flex: 1;
  padding-bottom: 20px;
}
.b-item {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 1px 8px;
  padding: 6px 8px;
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  border: 1px solid transparent;
}
.b-item:hover {
  background: rgba(212, 175, 55, 0.06);
  border-color: var(--line);
}
.b-item.on {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.14), rgba(212, 175, 55, 0.03));
  border-color: var(--line-2);
  color: var(--gold-hi);
}
.b-item .glyph {
  width: 14px;
  height: 14px;
  color: var(--gold);
  flex: none;
}
.b-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.b-sub {
  font-size: 10px;
  color: var(--dim);
  white-space: nowrap;
}
.swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: none;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 8px var(--c, transparent);
  background: var(--c, var(--gold));
}
.b-empty {
  margin: 4px 16px;
  color: var(--dim);
  font-style: italic;
  font-family: var(--serif);
  font-size: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 12px;
}
.field label {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.text-input {
  width: 100%;
  height: 28px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--ob-0);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
  outline: none;
  user-select: text;
}
.text-input:focus {
  border-color: var(--line-3);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.8),
    0 0 0 3px rgba(212, 175, 55, 0.1);
}
.select {
  height: 26px;
  padding: 0 24px 0 8px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: var(--ob-1)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23d4af37' fill='none' stroke-width='1.4'/%3E%3C/svg%3E")
    no-repeat right 8px center;
  appearance: none;
  color: var(--champagne);
  outline: none;
  cursor: pointer;
}
.select:hover {
  border-color: var(--line-3);
}
.select option {
  background: var(--ob-2);
  color: var(--text);
}

.b-caret {
  width: 16px;
  text-align: center;
  color: var(--gold);
  font-size: 11px;
  border-radius: 4px;
}
.b-caret:hover {
  background: rgba(212, 175, 55, 0.12);
}
/* The instrument tree: folders and instruments, indented by --depth. */
.b-item.folder,
.b-item.pick {
  padding-left: calc(6px + var(--depth, 0) * 14px);
}
.b-item.folder.open > .b-name {
  color: var(--gold-hi);
}
.b-item.pick {
  padding-top: 4px;
  padding-bottom: 4px;
  font-size: 11.5px;
  color: var(--champagne);
}
.b-item.pick:hover {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.1), transparent);
}
.b-item.pick.on {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.18), rgba(212, 175, 55, 0.03));
  border-color: var(--line-2);
  color: var(--gold-hi);
}
.b-item.pick .b-sub {
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Add / replace: on the row under the pointer (and the one playing). */
.b-acts {
  display: none;
  gap: 2px;
  margin: -3px 0;
}
.b-item.pick:hover .b-acts,
.b-item.pick.on .b-acts {
  display: flex;
}
.b-item.pick:hover .b-sub {
  display: none;
}
.b-acts .btn {
  width: 22px;
  height: 22px;
}
.b-acts .btn .glyph {
  width: 12px;
  height: 12px;
}

/* The search over the tree. */
.b-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--line);
}
.b-search > .glyph {
  position: absolute;
  left: 18px;
  width: 13px;
  height: 13px;
  color: var(--dim);
  pointer-events: none;
}
.b-search .text-input {
  padding-left: 28px;
}
.b-search-clear.empty {
  visibility: hidden;
}
