/* ============================================================
   编辑面板控件规格（panel-controls） v2.0
   ============================================================
   ⚠️ 数据来源 = 滚动歌单工具页（playlist）。
      这份文件里的每一个数值，都是从 playlist 的
      .row / .row>span / .section-title / .color-dot / 滑块 原样搬过来的，
      不是重新设计的。要改控件规格，先改这里，两个页面一起变；
      不许再在页面里写覆盖。

   管什么：编辑面板内部的「小标题 + 行 + 控件」三件套，两套类名共用一份值
     歌单（数据来源）          礼物菜单（对齐方）
     .section-title       ←→   [data-pd] .sub-label
     .row                 ←→   [data-pd] .param-row
     .row>span            ←→   [data-pd] .param-row>label
     .color-dot           ←→   [data-pd] .color-preview-btn

   为什么礼物页用 [data-pd] 前缀：
     礼物页里 .color-picker-row / .color-preview-btn 这几个类名
     在左侧素材浮层（背景 / 滚动 tab）里也在用，那是另一套尺寸。
     容器挂 data-pd 只覆盖编辑面板，不会串过去。

   依赖：base.css
     input[type=number|text|select] 的 padding 6px 8px / 13px / 圆角 --r-sm
     本来就是 base.css 给的，这里不重复声明外观，只补布局与宽度。
   ============================================================ */

/* ---------- ① 分区小标题 ----------
   歌单 .section-title：12px / 600 / --ink2 / 左侧 3×12 竖条 / 下边距 10px
   （歌单的面板级标题 #right h3 是 12px / 600 / #1e2540 / 深炭竖条，属另一层级，不在此列） */
.section-title,
[data-pd] .sub-label{
  display:flex;align-items:center;gap:6px;
  margin:0 0 10px;padding:0;
  font-size:12px;font-weight:600;line-height:16px;letter-spacing:0;
  color:var(--ink2);border-left:0;
}
.section-title::before,
[data-pd] .sub-label::before{
  content:'';flex:0 0 auto;width:3px;height:12px;
  background:var(--ink2);border-radius:2px;
}

/* 礼物页专属：小标题可折叠（歌单小标题不可折），带右侧折叠箭头 */
[data-pd] .sub-label{cursor:pointer;user-select:none;transition:color .15s}
[data-pd] .sub-label:hover{color:var(--charcoal)}
/* 上边距：歌单靠 .section{margin-bottom:20px} 拉开分组，礼物页没有 .section 包裹，
   所以由小标题的 margin-top 承担（14 + 下边距 10 ≈ 歌单的 20 + 10） */
[data-pd] .sub-label{margin-top:14px}
[data-pd] .sub-label:first-child{margin-top:0}
[data-pd] .sub-label::after{
  content:'';flex:0 0 auto;width:6px;height:6px;
  border-right:1.6px solid #9aa3b5;border-bottom:1.6px solid #9aa3b5;
  transform:rotate(45deg);transition:transform .16s ease,border-color .15s;
}
[data-pd] .sub-label:not(.sub-label-with-action)::after{margin-left:auto}
[data-pd] .sub-label.collapsed::after{transform:rotate(-45deg)}
[data-pd] .sub-label:hover::after{border-color:var(--charcoal)}
[data-pd] .sub-label.sub-label-with-action{justify-content:flex-start}
[data-pd] .sub-label.sub-label-with-action>span{flex:1 1 auto;min-width:0}
[data-pd] .sub-label.sub-label-with-action::after{margin-left:8px}

/* 小标题右侧的重置小按钮：18 高（= 小标题行高 +2），与 12px 标题同排不撑高 */
[data-pd] .btn-reset-default{
  flex:0 0 auto;height:18px;padding:0 7px;
  border:1px solid var(--line);border-radius:6px;background:#fff;
  color:var(--ink2);font-size:11px;line-height:1;font-family:inherit;cursor:pointer;
  transition:border-color .13s,color .13s;
}
[data-pd] .btn-reset-default:hover{border-color:var(--charcoal);color:var(--charcoal)}

/* ---------- ② 单行字段 ----------
   歌单 .row：flex / gap 8 / margin-bottom 8 / 12px / --ink2
   歌单 .row>span：flex 0 0 48px（2 字与 4 字标签统一 48，控件左缘才对得齐） */
.row,
[data-pd] .param-row{
  display:flex;align-items:center;gap:8px;margin-bottom:8px;
  font-size:12px;color:var(--ink2);
}
.row>span,
[data-pd] .param-row>label{
  flex:0 0 48px;width:48px;min-width:48px;padding:0;
  font-size:12px;color:var(--ink2);white-space:nowrap;
}

/* ---------- ③ 滑杆 ----------
   歌单：20 高 / 4px 轨道 / --ink2 进度填充（--fill 由 JS 同步）/ 14px 白底 thumb
   ⚠️ 写了 appearance:none 就必须自己画轨道和 thumb，否则只剩一个裸点。 */
.row input[type=range],
[data-pd] .param-row input[type=range]{
  flex:1 1 auto;min-width:0;width:auto;height:20px;margin:0;
  background:transparent;-webkit-appearance:none;appearance:none;cursor:pointer;
}
.row input[type=range]::-webkit-slider-runnable-track,
[data-pd] .param-row input[type=range]::-webkit-slider-runnable-track{
  height:4px;border-radius:999px;
  background:linear-gradient(to right,var(--ink2) var(--fill,50%),var(--line) var(--fill,50%));
}
.row input[type=range]::-webkit-slider-thumb,
[data-pd] .param-row input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none;appearance:none;width:14px;height:14px;margin-top:-5px;
  border-radius:50%;background:var(--bg);border:2px solid var(--ink2);
  box-shadow:0 1px 4px rgba(30,37,64,.28);
}
.row input[type=range]::-moz-range-track,
[data-pd] .param-row input[type=range]::-moz-range-track{
  height:4px;border-radius:999px;background:var(--line);
}
.row input[type=range]::-moz-range-progress,
[data-pd] .param-row input[type=range]::-moz-range-progress{
  height:4px;border-radius:999px;background:var(--ink2);
}
.row input[type=range]::-moz-range-thumb,
[data-pd] .param-row input[type=range]::-moz-range-thumb{
  width:14px;height:14px;border-radius:50%;
  background:var(--bg);border:2px solid var(--ink2);
}

/* ---------- ④ 数字框 / 文本 / 下拉 ----------
   外观（padding 6px 8px / 13px / 圆角 --r-sm / 1px --line）全部由 base.css 提供，
   这里只补歌单特有的布局：数字框固定 56 宽（滑杆后面那枚）、其余吃满剩余。 */
.row input[type=number],
.row select,
[data-pd] .param-row input[type=number],
[data-pd] .param-row input[type=text],
[data-pd] .param-row select{
  flex:1 1 auto;min-width:0;width:auto;
}
/* 滑杆后紧跟的数字框：歌单固定 56×28 居中 */
.row input[type=range]+input[type=number],
[data-pd] .param-row input[type=range]+input[type=number]{
  flex:0 0 56px;width:56px;min-width:56px;height:28px;text-align:center;
}
[data-pd] .param-row input:disabled{
  background:#f5f6fa;color:var(--mut);border-color:var(--line2);cursor:not-allowed;
}
/* 滑杆右侧只读数值（礼物页用它替代数字框的场景） */
[data-pd] .param-row .val{
  flex:0 0 28px;font-size:11.5px;color:var(--ink2);text-align:right;
  font-variant-numeric:tabular-nums;line-height:1;
}

/* ---------- ⑤ 取色行 ----------
   歌单 .color-dot：flex 吃满剩余 / 28 高 / 圆角 8 / 1px --line / 内边距 0 10px
   礼物页的色块结构多一层 .color-picker-wrap，要一起放开才能吃满。 */
[data-pd] .color-picker-row{
  display:flex;align-items:center;gap:8px;margin-bottom:8px;
  font-size:12px;color:var(--ink2);
}
[data-pd] .color-picker-row>label{
  flex:0 0 48px;width:48px;min-width:48px;padding:0;
  font-size:12px;color:var(--ink2);white-space:nowrap;
}
[data-pd] .color-picker-row .color-picker-wrap{flex:0 0 auto;display:flex}
[data-pd] .color-picker-row .color-preview-btn{
  flex:0 0 46px;width:46px;min-width:46px;height:26px;box-sizing:border-box;
  padding:0;border:1px solid var(--line);border-radius:6px;background:#fff;
  cursor:pointer;transition:border-color .13s;
}
[data-pd] .color-picker-row .color-preview-btn:hover{border-color:var(--charcoal)}

/* 歌单侧色块（数据来源原文）：flex 吃满剩余 / 28 高 / 圆角 8 / 内边距 0 10px */
/* v9.46 色块由「吃满整行」改固定 46×26 小块（用户：吃满整行的长条不行）。
   改在公共层 → 歌单与礼物两页同时变窄；两边都留白，不再出现一条横贯面板的色杠。 */
.color-dot{
  position:relative;flex:0 0 46px;width:46px;min-width:46px;height:26px;
  border-radius:6px;border:1px solid var(--line);background:#fff;
  cursor:pointer;padding:0;display:flex;align-items:center;justify-content:center;
  box-shadow:inset 0 0 0 1px rgba(15,20,40,.06);
}
.color-dot:hover{border-color:var(--charcoal)}
.color-dot:focus-visible{outline:none;border-color:var(--charcoal);box-shadow:0 0 0 2px rgba(35,39,47,.10)}

/* ════════════════════════════════════════════════════════════════
   ⑥ 分区 / 分段 / 文字样式按钮（PUB-17 从 panel.css 抽入）
   ----------------------------------------------------------------
   为什么抽：这 12 条一直只写在 panel.css 里，而 panel.css 整份引不进任何页面
   （第⑧段 #lyPanel/.lyRow 会与 layers.js 注入的图层面板冲突），
   于是每个工具页都在自己 <style> 里抄一份，且已经漂移：
     · gift-v2 把 .seg 改成「连体式」（gap:0 + 外框 + 分隔线），其余四页是「独立按钮」（gap:4）
     · gift-v2 的 .seg-fixed 按钮底用 --bg2（浅灰），其它页用 --bg（白）
   同一类名两种长相，正是「礼物页跟滚动歌单不一致」的根源之一。
   此处以 panel.css 原值为唯一版本；各页自补的副本一律删除。
   .section-title::before 已在上面与 [data-pd] .sub-label::before 合并声明，不重复。
   ════════════════════════════════════════════════════════════════ */

/* 分区容器：歌单靠它拉分组间距；礼物页没有 .section 包裹时由 .sub-label 的 margin-top 承担 */
.section{margin-bottom:20px}
/* 分区级标题：3px 中性灰竖条 + 12px 中性灰 */
.section-title{
  font-size:12px;color:var(--ink2);font-weight:600;
  margin-bottom:10px;display:flex;align-items:center;gap:6px;
}

/* ── 分段按钮（文字 / 图标两种） ── */
.seg{display:flex;gap:4px;flex:1}
.seg button{
  flex:1;height:28px;padding:0;border:1px solid var(--line);border-radius:var(--r-sm);
  background:var(--bg);font-size:12px;cursor:pointer;color:var(--ink2);
  display:flex;align-items:center;justify-content:center;
  transition:background .13s,border-color .13s,color .13s;font-family:inherit;
}
.seg button:hover{background:var(--sel-soft);border-color:var(--sel-line);color:var(--ink)}
.seg button.on{background:var(--sel-soft);border-color:var(--sel-line);color:var(--ink)}
/* 单按钮分段组：不参与拉伸，保持紧凑宽度 */
.seg.seg-auto{flex:0 0 auto;margin-left:auto}
.seg.seg-auto button{flex:0 0 auto;min-width:96px;padding:0 14px}
/* 图标型分段（描边位置 / 拐角）：固定 40px 方块右对齐 */
.seg.seg-fixed{flex:0 0 auto;margin-left:auto;gap:6px}
.seg.seg-fixed button{flex:0 0 40px;width:40px;height:30px}

/* ── 文字样式按钮组（B / I / U / 对齐） ── */
.styleRow{display:flex;gap:6px;flex:1}
.styleBtn{
  flex:1;height:28px;border:1px solid var(--line);border-radius:var(--r-sm);
  display:flex;align-items:center;justify-content:center;cursor:pointer;user-select:none;
  background:var(--bg);font-size:13px;color:var(--ink2);
  transition:background .13s,border-color .13s,color .13s;
}
.styleBtn:hover{background:var(--sel-soft);border-color:var(--sel-line);color:var(--ink)}
.styleBtn.on{background:var(--sel-soft);border-color:var(--sel-line);color:var(--ink);font-weight:700}

/* ---------- ⑦ 面板内容区滚动条（PUB-20）----------
   面板内容区一旦 overflow:auto，浏览器默认滚动条在 Windows 上是 17px 宽的灰槽，
   与编辑部件的细线风格冲突。统一：thin + 5px 圆角 thumb（色值同 .fwin-body / .fx-sub-body）。
   用法：给滚动容器加 class="panel-scroll" 即可，不必再写 scrollbar-* 。 */
.panel-scroll{
  scrollbar-width:thin;
  scrollbar-color:#d5dae6 transparent;
}
.panel-scroll::-webkit-scrollbar{width:5px;height:5px}
.panel-scroll::-webkit-scrollbar-track{background:transparent}
.panel-scroll::-webkit-scrollbar-thumb{background:#d5dae6;border-radius:5px}
.panel-scroll::-webkit-scrollbar-thumb:hover{background:#c3cad8}
