/* ─────────────────────────────────────────────────────────────
   filesystem-menu.css
   Styles for the FilesystemMenu cascading widget.
   ───────────────────────────────────────────────────────────── */

/* ── Menu panel ────────────────────────────────────────────── */

.fm-menu {
  position: absolute;
  z-index: 10;
  background: var(--Base_00);
  border: 1px solid var(--Base_dark10);
  border-radius: 7px;
  padding: 4px;
  min-width: 180px;
  max-width: 280px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.40),
    0 1px 4px  rgba(0, 0, 0, 0.20);
  font: var(--BodySr);
  color: var(--Text_00);
}

/* ── Menu item ─────────────────────────────────────────────── */

.fm-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 5px;
  cursor: pointer;
  color: var(--Text_00);
  outline: none;
  transition: background 80ms ease;
  user-select: none;
}

.fm-item:hover,
.fm-item:focus-visible {
  background: var(--Base_05);
}

.fm-item:focus-visible {
  box-shadow: 0 0 0 2px #5b9bd5;
}

/* Leaves are visually de-emphasised — they have no children to reveal */
.fm-item--leaf {
  color: #888;
}

.fm-item--leaf:hover,
.fm-item--leaf:focus-visible {
  color: #ddd;
}

/* ── Item sub-elements ─────────────────────────────────────── */

.fm-item__label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fm-item__arrow {
  font-size: 15px;
  color: var(--Text_00);
  flex-shrink: 0;
  margin-left: auto;
  line-height: 1;
}