/* cheer.js 专用样式（2026-10-23 为爱发电：数据、读者排查、设置三个页签）。通用组件和设计变量在 app.css；这里只放本页独有的类，
   覆盖通用类时用 [data-view=cheer] 限定。 */

/* 页签（.cheer-tabs，role=tablist）：2026-11-24 起由 glass.css 统一画成分段控件，这里不再自带下划线样式 */

/* 筛选：时间段占第一行（预设胶囊与“自定义”的两个日期），搜索、排序在第二行；控件同高（同运营数据） */
.cheer-filters>.cheer-period{flex:1 1 100%;margin:0}
[data-view=cheer] .period-bar{gap:12px 20px}
/* 时间段预设是 app.css 的分段控件（.period-presets）：格子之间不另加间距；整条和右边的日期框、下一行的输入框同高（2026-11-24） */
[data-view=cheer] .period-presets .button{min-height:calc(var(--control-h) - 6px)}
[data-view=cheer] .period-dates{gap:8px 10px}
[data-view=cheer] .period-dates input{height:var(--control-h);min-height:var(--control-h);padding:8px 10px 8px 12px;font-size:14px}
/* 作品（可选）（2026-10-25 选作品，读者排查与作废）：标签下一行是当前作品（或“全部作品”）和按钮，与其他控件同高；
   查找区（book-picker.css）展开时占整行，在筛选栏里排到“查询”之后 */
.cheer-book-choice{min-width:0}
.cheer-filters>.cheer-book-choice{flex:2 1 300px}
.cheer-book-label{display:block;font-size:13px;line-height:var(--label-h);color:var(--text-2);font-weight:600}
.cheer-book-shown{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;min-height:var(--control-h);margin-top:var(--label-gap)}
.cheer-book-value{min-width:0;font-size:14px;font-weight:600;color:var(--text);overflow-wrap:anywhere}
.cheer-book-value>.table-sub{display:inline;margin-left:8px;font-weight:400}
/* 查找区在页面底色上：和卡片一样白底、无边框（2026-11-24 iOS 风格） */
.cheer-book-finder{min-width:0;padding:12px 14px;border:0;border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow-sm)}
.cheer-filters>.cheer-book-finder{flex:1 1 100%;order:1}

/* 合计六格 */
.cheer-stats{grid-template-columns:repeat(6,minmax(0,1fr))}

/* 表格：数字列右对齐、等宽数字；平台净额为负标红 */
.cheer-table table{font-variant-numeric:tabular-nums}
.cheer-table :is(th,td):nth-child(n+2){text-align:right;white-space:nowrap}
.cheer-table.sticky-actions :is(th,td):last-child{text-align:left}
.cheer-table .cheer-book,.cheer-table .cheer-reader{min-width:200px}
/* “发电最多的作品”是文字列，靠左、可折行。带上 td，表头用 :has 找到这张表的第五列（2026-11-12）：原来的选择器比上面
   “数字列右对齐”那条弱，没生效，书名靠右、下面的小字又悬在中间 */
.cheer-table td.cheer-top-book{text-align:left;white-space:normal;min-width:160px}
.cheer-table:has(td.cheer-top-book) th:nth-child(5){text-align:left}
.cheer-negative,.stat-value .cheer-negative{color:var(--danger);font-weight:600}
/* 弹窗里的小表：细线圈出、圆角同分组列表（2026-11-24，原来是 1px 边框） */
.cheer-days .cheer-table,.cheer-detail .cheer-table{border-radius:12px;box-shadow:0 0 0 1px var(--separator)}
.cheer-detail .metadata{margin-bottom:16px}

/* 设置：单选组横排；只读事实放在表单下面的浅底块里 */
.cheer-choice-set{display:flex;flex-wrap:wrap;gap:8px 10px;border:0;margin:0;padding:0}
.cheer-choice-set legend{width:100%;margin-bottom:6px;font-size:13px;font-weight:600;color:var(--text-2)}
.cheer-settings-form>.notice{margin-bottom:16px}
/* 公钥和密钥是否可用、今天的数字、最近保存放在表单上面（2026-11-12，cheer.js）：先看现状，再改设置 */
/* 浅灰底的信息块，同弹窗里的键值面板（2026-11-24：去掉边框，圆角加大） */
.cheer-readonly{margin-bottom:18px;padding:14px 18px;border:0;border-radius:14px;background:var(--field-bg)}
/* 宽屏：金额、次数、上限三个短数字一行，三个广告单元一行（原来两列，“全站每天上限”和“穿山甲代码位”各自占一行）；
   三列时不要占位格。1400 以下一列放不下完整的广告单元 ID，仍按两列（2026-11-12） */
@media(min-width:1400px){
  .cheer-settings-form>.form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .cheer-settings-form .cheer-grid-spacer{display:none}
}
.cheer-settings-locked{margin:16px 0 0}
[data-view=cheer] input[name^=adUnit]{font-family:var(--mono)}

@media(max-width:1280px) {
  .cheer-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px) {
  /* 手机：七个预设排成四列两行，两个日期各占一半；合计两列；作品与读者列收窄，后面的数字露出一部分，看得出表格可以横滑 */
  [data-view=cheer] .cheer-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
  [data-view=cheer] .period-presets .button{min-width:0;padding-left:6px;padding-right:6px}
  [data-view=cheer] .period-dates{flex:1 1 100%;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
  [data-view=cheer] .period-dates input{width:100%;min-width:0}
  .cheer-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  /* 设置：一列时不留占位（宽屏上它让两个广告单元另起一行） */
  .cheer-grid-spacer{display:none}
  .cheer-table .cheer-book,.cheer-table .cheer-reader{min-width:150px}
  .cheer-table :is(.cheer-book,.cheer-reader) :is(.table-title,.table-sub){max-width:170px}
}
