/* ============ Sounds ============ */
/* Follows the FL Studio Web sounds browser. The metrics here are measured off
   a 1:1 screenshot of that panel rather than estimated: 30px search field,
   28px round toggles, 18px filter pills, 36px rows with a 28px thumbnail and
   an 18px add button, and 11px Barlow labels.
   Tones are the reference's, which sits on a #333333 panel; ours is a step
   darker, so the same values read with slightly more contrast. */

.snd {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  font-family: var(--font-ui);
  color: #f5f5f5;
}

/* ---------- Kind tabs ---------- */

.snd-search-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 10px 11px;
  flex-shrink: 0;
}

.snd-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

/* The field is darker than the panel, so it reads as inset. */
.snd-search-icon {
  position: absolute;
  left: 9px;
  font-size: 16px;
  color: #a8a8a8;
  pointer-events: none;
}

.snd-search {
  width: 100%;
  height: 30px;
  padding: 0 12px 0 31px;
  border: none;
  border-radius: 15px;
  background: #191919;
  color: #f5f5f5;
  font-family: inherit;
  font-size: 11px;
  outline: none;
}

.snd-search::placeholder {
  color: #9a9a9a;
}

.snd-search:focus {
  background: #101010;
}

.snd-round {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #484848;
  color: #b4b4b4;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.snd-round .material-symbols-outlined {
  font-size: 16px;
}

.snd-round:hover {
  background: #565656;
  color: #f0f0f0;
}

.snd-round.is-on {
  background: var(--accent);
  color: #fff;
}

/* ---------- Category pill ---------- */




/* ---------- Applied filter chip ---------- */
/* One pill holding both controls, as in the reference: the cross clears the
   filter, the chevron changes it. */













/* ---------- Segmented type switch ---------- */
/* Two separate pills with a gap, not a track with a raised segment. */






/* ---------- List ---------- */

.snd-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}






/* ---------- Rows ---------- */

.snd-rows {
  padding: 0 10px 10px;
}

.snd-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 5px 0 3px;
  border-radius: 8px;
}

.snd-row:hover {
  background: #484848;
}



/* The play mark, and the stop mark once it is the sound playing. */

.snd-row--plain .snd-cover--play,

/* Content text, so Noto Sans rather than the interface face. */
.snd-name {
  flex: 1;
  min-width: 0;
  font-family: var(--font-text);
  font-size: 12px;
  color: #f5f5f5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snd-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid #7a7a7a;
  border-radius: 50%;
  background: transparent;
  color: #d0d0d0;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.snd-add .material-symbols-outlined {
  font-size: 12px;
}

.snd-add:hover {
  background: #565656;
  border-color: #e0e0e0;
  color: #fff;
}


.snd-add.is-done {
  border-color: var(--success);
  color: var(--success);
}

.snd-empty {
  padding: 26px 12px;
  text-align: center;
  font-size: 11px;
  color: #9a9a9a;
}

/* The browser reads as a panel, not a page: in a wide one the controls stop
   stretching before they look like form fields. */
.snd-search-row,

/* ---------- Filters ---------- */

/* Every filter is a chip in one row: the sample kinds first, then the
   categories, so narrowing reads as one set of choices rather than two. */
.snd-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 0 10px 10px;
  flex-shrink: 0;
}

.snd-chip-btn {
  height: 22px;
  padding: 0 10px;
  border: 1px solid #4e4e4e;
  border-radius: 999px;
  background: transparent;
  color: #cfcfcf;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.snd-chip-btn:hover {
  border-color: #7a7a7a;
  color: #fff;
}

.snd-chip-btn.is-on {
  background: #e6e6e6;
  border-color: #e6e6e6;
  color: #1a1a1a;
}

.snd-chips-gap {
  width: 1px;
  height: 16px;
  background: #4e4e4e;
  margin: 0 3px;
}

/* ---------- List or group ---------- */

.snd-views {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px 10px;
  flex-shrink: 0;
}

.snd-view {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 5px;
  background: none;
  border: none;
  border-radius: 6px;
  color: #8a8a8a;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: color 0.1s;
}

.snd-view .material-symbols-outlined {
  font-size: 15px;
}

.snd-view:hover {
  color: #d0d0d0;
}

.snd-view.is-on {
  color: #ffffff;
  font-weight: 600;
}

/* ---------- Sample rows ---------- */

.snd-cover {
  display: block;
  flex-shrink: 0;
  border-radius: 5px;
  overflow: hidden;
  background: #1a1a1a;
}

.snd-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.snd-row .snd-cover {
  position: relative;
  width: 30px;
  height: 30px;
}

/* A row plays its sample, so the cover carries the mark for it. */
.snd-cover--play::after {
  content: '▶';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.12s;
}

.snd-row:hover .snd-cover--play::after,
.snd-cover--play.playing::after {
  opacity: 1;
}

.snd-cover--play.playing::after {
  content: '■';
}

/* The pack over the sample, which is how a flat list still says where a sound
   came from. */
.snd-stack {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.snd-pack-label {
  font-family: var(--font-text);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: #9a9a9a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snd-row--plain {
  height: 30px;
  padding-left: 4px;
}

.snd-row--plain .snd-name {
  font-size: 11.5px;
  color: #dedede;
}

/* ---------- A pack ---------- */

.snd-pack {
  padding: 0 10px 6px;
}

.snd-pack-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
}

/* Sized in the same proportion of the column as the reference browser, so a
   pack reads as a pack rather than as another row. */
.snd-pack-cover {
  width: 68px;
  height: 68px;
  border-radius: 7px;
}

.snd-pack-name {
  flex: 1;
  min-width: 0;
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 600;
  color: #f5f5f5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Instruments and effects ---------- */

.snd-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 10px 12px;
}

/* A plugin card is its own panel, as wide as the column: the name, then the
   art, which is what the plugin actually looks like. */
.snd-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  background: none;
  border: none;
  font-family: inherit;
  text-align: left;
  cursor: grab;
}

.snd-card:active {
  cursor: grabbing;
}

.snd-card-name {
  font-family: var(--font-text);
  font-size: 12.5px;
  font-weight: 600;
  color: #f0f0f0;
}

.snd-card-art {
  width: 100%;
  border-radius: 8px;
}

/* The whole plugin panel, kept to its own proportions rather than cropped to a
   square the way a sample's cover is. */
.snd-card-art img {
  height: auto;
  object-fit: contain;
}

.snd-card:hover .snd-card-art {
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.25);
}
