/*
  15-menu.css — v41.20 the Customise Menu sheet

  Width budget, which is what the old version got wrong: a bottom sheet on a
  360px phone gives about 312px of usable row after the sheet's own padding.
  The previous row packed a rank badge, icon, name, a pill-shaped checkbox
  toggle and two arrow buttons into that, and the last arrow was clipped off
  the edge of the screen.

  Here: icon 26 + gaps 16 + three 38px buttons = 156, leaving ~156 for the
  name — comfortable for every label in NAV_DEFS. Hidden rows carry one button
  instead of three, because reordering something that isn't in the bar does
  nothing.

  Unlayered, loaded after styles.css. No !important.
*/

.menu-cust { display: grid; gap: var(--s3); }

.menu-help {
  margin: 0;
  font-size: .8rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ==========================================================
   Live preview of the resulting bar
   ========================================================== */
.menu-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-m);
  background: var(--hull);
}
.mp-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(232, 192, 105, .28);
  color: #f3e6c8;
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
}
.mp-pill .menu-ico { width: 14px; height: 14px; }
.mp-pill .menu-ico svg { stroke: var(--brass-bright); }

/* ==========================================================
   Layout templates
   ========================================================== */
.menu-tpl { display: flex; flex-wrap: wrap; gap: 6px; }

/* ==========================================================
   Section heads
   ========================================================== */
.menu-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--s2);
}
.menu-head h3 {
  margin: 0;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}
.menu-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--chart-2);
  border: 1px solid var(--line-strong);
  font-size: .68rem;
  font-weight: 800;
  color: var(--ink-soft);
}

/* ==========================================================
   Rows
   ========================================================== */
.menu-list { display: grid; gap: 5px; }

.menu-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 6px 8px 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-s);
  background: var(--chart);
}
.menu-row.is-hidden { background: transparent; border-style: dashed; min-height: 44px; }

.menu-ico { width: 20px; height: 20px; flex: 0 0 auto; display: block; }
.menu-ico svg {
  width: 100%; height: 100%;
  fill: none; stroke: var(--muted);
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.menu-row.is-hidden .menu-ico svg { stroke: #a08c67; }

.menu-name {
  flex: 1;
  min-width: 0;
  font-weight: 750;
  font-size: .9rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-row.is-hidden .menu-name { color: var(--ink-soft); font-weight: 650; }

.menu-acts { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }

.menu-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-s);
  background: var(--chart-2);
  color: var(--ink);
  font: inherit;
  font-size: .82rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .12s ease, border-color .12s ease;
}
.menu-btn:hover { background: var(--paper3); border-color: var(--brass); }
.menu-btn:active { transform: translateY(1px); }
.menu-btn:disabled { opacity: .38; cursor: default; }
.menu-btn:disabled:hover { background: var(--chart-2); border-color: var(--line-strong); }

.menu-btn.menu-remove { color: #8f2318; font-weight: 800; font-size: 1.05rem; }
.menu-btn.menu-add {
  background: var(--lagoon-deep);
  border-color: transparent;
  color: #eaf6f4;
  font-weight: 800;
  font-size: .95rem;
}
.menu-btn.menu-add:hover { background: var(--lagoon); border-color: transparent; }

.menu-lock {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 9px;
  border-radius: var(--r-s);
  background: transparent;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

@media (max-width: 340px) {
  .menu-btn { width: 34px; height: 34px; }
  .menu-lock { height: 34px; padding: 0 7px; }
  .menu-row { min-height: 48px; gap: 6px; }
}
