/* 每日打卡时间：训练周期 / 训练日期下方的联动卡片。

   视觉口径与「体态矫正 → 每天打卡时间」完全一致（css/posture-checkin-flow.css）：
   紫色小标题 + 卡片标题 + 76px 高的大号时间按钮 + 说明 + 提示；
   点击后弹出居中的滑轮时间选择器（紫色时间预览 + 时/分两列滚轮）。
   这个文件只作用于 .checkin-time-panel 内部，不改训练页原有卡片外壳。 */

/* 卡片与弹窗不在同一棵树里（弹窗挂在 body 上才能盖住整页），
   所以两处都要带同一套色板变量，否则弹窗里的 var() 会解析失败。 */
.checkin-time-panel,
.checkin-time-overlay{
  --ui-primary:#6e49e5;
  --ui-primary-deep:#5b36cf;
  --ui-primary-ink:#4b2bb5;
  --ui-primary-soft:#f1ecff;
  --ui-primary-border:#ded3ff;
  --ui-ink:#241b52;
  --ui-muted:#66608a;
  --ui-focus:#b9a1fc;
}

/* ---------- 卡片 ---------- */
.checkin-time-kicker{
  display:block;margin:0 0 4px;color:#7c56cd;
  font-size:12px;font-weight:700;letter-spacing:.08em;
}
.checkin-time-panel h2{
  margin:0 0 6px;color:#15204a;font-size:18px;font-weight:750;line-height:1.5;
}
.ct-section.checkin-time-panel h2{font-size:17px;letter-spacing:-.02em}
/* 标题后的红色提醒：紧贴标题（6px），与下方说明文案（12px）拉开层级。
   浅红底 + 左侧红条 + 红点，只强调「选时间要认真的」这一件事，不抢主标题。 */
.checkin-time-alert{
  display:flex;align-items:flex-start;gap:7px;
  margin:0 0 14px;padding:7px 11px 7px 10px;
  border:1px solid #f8d5cf;border-left:3px solid #dc2626;border-radius:10px;
  background:linear-gradient(100deg,#fff8f6,#fff1ec);
  color:#b42318;font-size:12px;font-weight:700;line-height:1.6;letter-spacing:.01em;
}
.checkin-time-alert::before{
  content:'';flex:none;width:6px;height:6px;margin-top:6px;border-radius:50%;
  background:#dc2626;box-shadow:0 0 0 3px #fde6e1;
}
.checkin-time-trigger{
  display:flex;align-items:center;gap:14px;width:100%;min-height:76px;
  margin:2px 0 0;padding:14px 18px;
  border:1.5px solid var(--ui-primary-border);border-radius:18px;
  background:linear-gradient(120deg,#faf8ff,#f1ecff);color:var(--ui-primary-deep);
  font:inherit;text-align:left;cursor:pointer;
  transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease;
}
.checkin-time-trigger:hover{border-color:var(--ui-focus);box-shadow:0 6px 18px #7050d014}
.checkin-time-trigger:active{transform:translateY(1px)}
.checkin-time-trigger:focus-visible{outline:3px solid var(--ui-focus);outline-offset:3px}
.checkin-time-trigger i:first-child{font-size:24px;line-height:1}
.checkin-time-value{
  font-size:32px;font-weight:700;line-height:1.2;letter-spacing:.02em;
  font-variant-numeric:tabular-nums;
}
.checkin-time-caret{
  width:10px;height:10px;margin-left:auto;flex:none;
  border-right:2px solid currentColor;border-bottom:2px solid currentColor;
  transform:translateY(-3px) rotate(45deg);opacity:.7;
}
.checkin-time-note{
  margin:12px 0 0;color:var(--ui-muted);font-size:12px;line-height:1.8;
}
.checkin-time-hint{margin:8px 0 0;font-size:12px;line-height:1.6;color:#7a72a0}

/* ---------- 滑轮弹窗（沿用体态矫正的时间弹窗观感） ---------- */
.checkin-time-overlay{
  position:fixed;inset:0;z-index:21000;display:grid;place-items:center;padding:16px;
  background:#1a17495c;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);
}
.checkin-time-dialog{
  width:min(100%,400px);max-height:calc(100dvh - 32px);overflow:auto;
  padding:0 22px 22px;border:1px solid #eae3ff;border-radius:28px;background:#fff;
  box-shadow:0 22px 70px #25165b30;color:var(--ui-ink);
  animation:checkinTimeIn .22s ease-out;
}
@keyframes checkinTimeIn{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}
.checkin-time-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  padding:22px 0 16px;
}
.checkin-time-head small{
  display:block;margin-bottom:4px;color:#7c56cd;
  font-size:12px;font-weight:700;letter-spacing:.08em;
}
.checkin-time-head h2{margin:0;color:var(--ui-ink);font-size:20px;font-weight:750;line-height:1.4}
.checkin-time-close{
  display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:14px;
  background:#f4f0ff;color:#6f4fd0;font-size:26px;line-height:1;cursor:pointer;
}
.checkin-time-preview{
  display:grid;place-items:center;height:88px;border-radius:20px;
  background:linear-gradient(115deg,#7c5ae9,#5b36cf);
  box-shadow:0 10px 24px #6e49e533;color:#fff;
}
.checkin-time-preview strong{
  font-size:40px;font-weight:700;line-height:1;letter-spacing:.04em;
  font-variant-numeric:tabular-nums;
}
.checkin-time-wheel{margin-top:18px}
.checkin-time-wheel-labels{
  display:grid;grid-template-columns:1fr 22px 1fr;padding-bottom:8px;
  text-align:center;color:#7c56cd;font-size:12px;font-weight:600;
}
.checkin-time-wheel-body{position:relative;display:grid;grid-template-columns:1fr 22px 1fr;height:220px}
.checkin-time-highlight{
  position:absolute;left:0;right:0;top:88px;z-index:1;height:44px;
  border-top:1px solid var(--ui-primary-border);
  border-bottom:1px solid var(--ui-primary-border);
  border-radius:14px;background:var(--ui-primary-soft);pointer-events:none;
}
.checkin-time-col{
  position:relative;z-index:2;height:220px;overflow:hidden;
  overscroll-behavior:contain;touch-action:none;cursor:grab;
  -webkit-mask-image:linear-gradient(180deg,transparent,#000 25%,#000 75%,transparent);
  mask-image:linear-gradient(180deg,transparent,#000 25%,#000 75%,transparent);
}
.checkin-time-col.is-dragging{cursor:grabbing}
/* 上下各一个跳格按钮：不习惯拖动的人点一下就走一格 */
.checkin-time-step{
  position:absolute;left:50%;z-index:3;display:grid;place-items:center;
  width:30px;height:22px;margin-left:-15px;padding:0;border:0;border-radius:8px;
  background:transparent;color:#a99cc7;font:inherit;font-size:11px;line-height:1;cursor:pointer;
}
.checkin-time-step.up{top:6px}
.checkin-time-step.down{bottom:6px}
.checkin-time-step:active{background:#efe8ff;color:#5b36cf}
.checkin-time-list{display:grid;will-change:transform}
.checkin-time-item{
  display:grid;place-items:center;height:44px;
  color:#6f688c;font-size:18px;font-weight:500;font-variant-numeric:tabular-nums;
  cursor:pointer;user-select:none;transition:color .15s ease,font-size .15s ease;
}
.checkin-time-item.is-active{color:var(--ui-primary-ink);font-size:24px;font-weight:700}
.checkin-time-pad{height:88px}
.checkin-time-colon{
  position:relative;z-index:2;display:grid;place-items:center;height:220px;
  color:#7c56cd;font-size:22px;font-weight:700;
}
.checkin-time-help{margin:14px 0 18px;text-align:center;color:var(--ui-muted);font-size:12px;line-height:1.6}
.checkin-time-actions{display:flex;gap:10px}
.checkin-time-actions button{
  flex:1;min-height:50px;padding:10px 16px;border:0;border-radius:15px;
  font:inherit;font-size:15px;font-weight:700;cursor:pointer;
}
.checkin-time-cancel{background:#f0eafa;color:#6f4fd0}
.checkin-time-actions .checkin-time-confirm{
  flex:1.4;background:linear-gradient(110deg,#7c5ae9,#5b36cf);color:#fff;
  box-shadow:0 7px 18px #6e49e533;
}
.checkin-time-dialog :focus-visible{outline:3px solid var(--ui-focus);outline-offset:3px}
/* 打开时把焦点放在弹窗本身（tabindex=-1），不需要画出焦点框 */
.checkin-time-dialog:focus{outline:none}

@media (max-width:380px){
  .checkin-time-value{font-size:28px}
  .checkin-time-trigger{min-height:72px;padding:12px 15px;gap:12px}
  .checkin-time-alert{font-size:11.5px;padding:6px 9px;gap:6px}
  .checkin-time-dialog{padding:0 16px 16px}
  .checkin-time-dialog .checkin-time-head{padding:18px 0 12px}
  .checkin-time-preview strong{font-size:34px}
}
@media (prefers-reduced-motion:reduce){
  .checkin-time-trigger,.checkin-time-item,.checkin-time-dialog{transition:none;animation:none}
}
