/* =========================================================
   KitTheme — FL Studio Browser panel
   ---------------------------------------------------------
   The imitation of FL's Browser, shared by the editor's live
   preview (kittheme/editor.html) and the homepage example
   (kittheme/index.html), so the example is the editor's real
   rendering and the two can't drift apart.

   Matched against FL Studio 2026 side by side:
     - Cuprum, the UI font FL ships in Artwork/Fonts (SIL Open
       Font License, self-hosted in assets/kittheme/fonts.css)
     - near-black ground, light-grey text, one thin tree guide
     - FL's outline folder for folders with no IconIndex (drawn
       by KitTheme; FL's own icon font isn't redistributable)
     - no disclosure arrows — the preview shows them on hover
       only, so folders can still be opened

   Every color is a --fl-* variable. This file is FL's dark look;
   the editor's light mode overrides the variables in kittheme.css.
   Load this BEFORE a page's own stylesheet so overrides win.
   ========================================================= */

.fl-browser {
  --fl-bg: #16171a;
  --fl-line: #2a2c31;
  --fl-border: #0b0c0e;
  --fl-text: #d9dadd;
  --fl-dim: #8e9198;
  --fl-icon: #c3c5ca;
  --fl-glyph: #d3d5da;
  --fl-arrow: #6d7078;
  --fl-hover: rgba(255,255,255,.045);
  --fl-selected: rgba(124, 100, 234, .3);
  --fl-hint: #111214;
  --fl-hint-text: #9aa0ab;
  --fl-missing: #d06464;
  font-family: "Cuprum", "Arial Narrow", "Segoe UI", Tahoma, sans-serif;
  width: 340px;
  max-width: 100%; /* never wider than the stage on narrow screens */
  background: var(--fl-bg);
  color: var(--fl-text);
  border: 1px solid var(--fl-border);
  border-radius: 3px;
  box-shadow: 0 16px 44px rgba(0,0,0,.4);
  overflow: hidden;
  flex: none;
}
.fl-titlebar {
  display: flex; align-items: center; gap: 7px;
  background: var(--fl-bg);
  padding: 5px 9px 5px 8px;
  font-size: 14px; letter-spacing: 1.4px; color: var(--fl-text);
  border-bottom: 1px solid var(--fl-line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fl-title-ico { width: 14px; height: 14px; flex: none; fill: var(--fl-dim); }
.fl-list { position: relative; padding: 3px 0 4px; min-height: 90px; }
/* FL's tree guide: one thin vertical rule down the left of the list */
.fl-list::before {
  content: ""; position: absolute; left: 13px; top: 0; bottom: 0; width: 1px;
  background: var(--fl-line); pointer-events: none;
}
.fl-item { position: relative; }
.fl-item-row {
  display: flex; align-items: center; gap: 6px;
  padding: 1px 8px 1px 6px;
  cursor: default;
  min-height: 22px;
}
.fl-item-row:hover { background: var(--fl-hover); }
.fl-item-row.selected { background: var(--fl-selected); }
.fl-arrow {
  width: 10px; flex: none; color: var(--fl-arrow); font-size: 8px; line-height: 1;
  opacity: 0; transition: opacity .12s;
}
.fl-item-row:hover .fl-arrow.has-kids { opacity: 1; }
.fl-arrow.has-kids { cursor: pointer; }
.fl-arrow.has-kids:hover { color: var(--fl-text); }
.fl-ico { width: 15px; height: 15px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--fl-icon); }
.fl-ico svg { width: 14px; height: 14px; fill: currentColor; }
/* Icons matched against FL (e.g. IconIndex 13846, the ✖) */
.fl-ico svg.fl-glyph { width: 12px; height: 12px; color: var(--fl-glyph); }
.fl-name {
  font-size: 14px; letter-spacing: .9px; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fl-bitmap { padding: 1px 0 3px 22px; overflow: hidden; }
.fl-bitmap img {
  display: block;
  /* FL's artwork scale (~40% of pixel size, set per image) — a page-wide
     img{max-width:100%} would silently shrink it further to the panel width */
  max-width: none;
}
/* Audio files: listed, never playable */
.fl-sample-row {
  display: flex; align-items: center; gap: 6px;
  min-height: 20px; padding: 1px 8px 1px;
  font-size: 13px; letter-spacing: .5px; color: var(--fl-dim);
  cursor: default;
}
.fl-audio-ico { width: 12px; height: 12px; flex: none; fill: var(--fl-dim); }
.fl-sample-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-footer-row .fl-ico { color: var(--fl-dim); }
.fl-footer-row .fl-name { color: var(--fl-dim); }
.fl-lock { width: 11px; height: 11px; flex: none; margin-left: auto; fill: var(--fl-dim); opacity: .8; }
.fl-hintbar {
  background: var(--fl-hint);
  border-top: 1px solid var(--fl-line);
  color: var(--fl-hint-text);
  font-size: 13px;
  padding: 4px 9px;
  min-height: 24px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fl-hintbar b { color: var(--fl-text); font-weight: 600; }
