/* ============ Browser: a plugin's own page ============ */
/* Covers the whole Browser panel, tabs included, because it is a different
   place in the browser rather than another tab of it. */

.pb {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--sh-panel);
  border-radius: var(--sh-radius);
  overflow: hidden;
}

/* ---------- Header ---------- */

/* The track the plugin belongs to, and the arrow back out of the page. */
.pb-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 6px;
  flex-shrink: 0;
}

/* The arrow and the name together: the name is the way back too, so it is
   inside the button rather than beside it. */
.pb-back {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 3px 8px;
  margin-left: -6px;
  background: none;
  border: none;
  border-radius: 8px;
  color: #e8e8e8;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  flex-shrink: 1;
}

.pb-back .material-symbols-outlined {
  font-size: 22px;
  flex-shrink: 0;
}

.pb-back:hover {
  background: rgba(255, 255, 255, 0.08);
}

.pb-track {
  min-width: 0;
  font-family: var(--font-text);
  font-size: 19px;
  font-weight: 600;
  color: #f5f5f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pb-icon {
  margin-left: auto;
  padding-left: 8px;
  font-size: 19px;
  color: #9a9a9a;
  flex-shrink: 0;
}

/* ---------- The chain this plugin sits in ---------- */

.pb-chain {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 0 12px 10px;
  flex-shrink: 0;
}

.pb-crumb {
  padding: 1px 2px;
  background: none;
  border: none;
  color: #8a8a8a;
  font-family: var(--font-text);
  font-size: 13px;
  cursor: pointer;
}

.pb-crumb:hover {
  color: #e0e0e0;
}

/* The plugin the page is showing. */
.pb-crumb.is-on {
  color: #ffffff;
  font-weight: 600;
}

.pb-crumb--add {
  color: #8a8a8a;
  font-size: 15px;
  cursor: default;
}

.pb-sep {
  color: #6a6a6a;
  font-size: 13px;
}

/* ---------- Search ---------- */

/* One field with its icons inside it, which is how the browser signs a field
   that can be narrowed rather than one that can be acted on. */
.pb-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 12px;
  padding: 0 10px;
  height: 34px;
  border-radius: 999px;
  background: #1c1c1c;
  flex-shrink: 0;
}

.pb-search .material-symbols-outlined {
  font-size: 17px;
  color: #8a8a8a;
  flex-shrink: 0;
}

.pb-dim {
  color: #9a9a9a;
}

.pb-query {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-text);
  font-size: 12.5px;
}

/* ---------- The plugin, and its presets ---------- */

.pb-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 12px 12px;
}

/* The panel itself, at the width of the column — the same art the Rack draws
   the plugin with, so the page and the chain agree about what it looks like. */
.pb-art {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}

.pb-art img {
  display: block;
  width: 100%;
  height: auto;
}

.pb-presets {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.pb-preset {
  width: 100%;
  padding: 5px 8px;
  margin-left: -8px;
  background: none;
  border: none;
  border-radius: 6px;
  color: #9a9a9a;
  font-family: var(--font-text);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pb-preset:hover {
  color: #e0e0e0;
}

.pb-preset.is-on {
  background: #1c1c1c;
  color: #ffffff;
}

.pb-empty {
  padding: 14px 0;
  font-family: var(--font-text);
  font-size: 12px;
  color: #9a9a9a;
}
