/* LexForm Desk: time widgets (header clock, task drawer time section,
   Timesheets view). Reuses the design tokens and controls from app.css. */

/* ------------------------------------------------------------ header clock */
.clockwidget { display: flex; align-items: center; gap: 8px; font-family: var(--font-sans); }
.clock-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--surface);
  color: var(--navy); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.clock-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.clock-btn.on { background: var(--st-dn-bg); border-color: transparent; color: var(--st-dn-fg); }
.clock-btn .num { font-variant-numeric: tabular-nums; font-family: var(--font-sans); font-size: 12px; opacity: .85; }
.clock-btn .lbl.short { display: none; }
.clock-forgot {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  border-radius: var(--r-ctl); border: 1px solid transparent; background: var(--st-od-bg);
  color: var(--st-od-fg); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap;
  animation: pulse-warn 2s ease-in-out infinite;
}
@keyframes pulse-warn { 0%, 100% { opacity: 1; } 50% { opacity: .7; } }
.timer-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 6px 0 10px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--navy-tint); color: var(--navy);
  font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.timer-chip .ref { font-family: var(--font-sans); }
.timer-chip .num { font-variant-numeric: tabular-nums; font-family: var(--font-sans); }
.timer-chip .stopbtn {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 999px;
  border: 0; background: rgba(10, 31, 68, .08); color: inherit; cursor: pointer; flex: none;
}
.timer-chip .stopbtn:hover { background: rgba(10, 31, 68, .18); }
:root[data-theme="dark"] .timer-chip .stopbtn { background: rgba(255, 255, 255, .1); }
:root[data-theme="dark"] .timer-chip .stopbtn:hover { background: rgba(255, 255, 255, .18); }

/* ------------------------------------------------------------ drawer time section */
.time-section { display: flex; flex-direction: column; gap: 12px; padding: 14px; margin-bottom: 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-card); }
.time-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.time-total { font-size: 24px; line-height: 28px; font-weight: 700; font-variant-numeric: tabular-nums; font-family: var(--font-sans); }
.timer-live { align-items: center; }
.timer-live .chip.src-timer { font-variant-numeric: tabular-nums; font-family: var(--font-sans); }
.chip.src-timer { background: var(--navy-tint); color: var(--navy); }
.chip.src-manual { background: var(--surface-3); color: var(--text-2); }
.chip.src-correction { background: var(--st-wt-bg); color: var(--st-wt-fg); }
.time-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.time-list .list-item:hover { background: var(--surface); }

/* ------------------------------------------------------------ timesheets view */
.ts-diff { color: var(--crimson); font-weight: 600; }

/* ------------------------------------------------------------ mobile */
@media (max-width: 767px) {
  .clockwidget { gap: 4px; }
  .clock-forgot .lbl { display: none; }
  .clock-btn { padding: 0 10px; gap: 6px; }
  /* Swap the full wording for a short one so the button stays legible next
     to a timer chip: "In 2:15" while clocked in (the running total stays
     visible, per the bug this replaces), plain "Clock in" while clocked out
     (no total shown, since none is running). Never a bare icon. */
  .clock-btn .lbl.full { display: none; }
  .clock-btn .lbl.short { display: inline; }
  .clock-btn:not(.on) .num { display: none; }
  .timer-chip .ref { display: none; }
  .time-total { font-size: 20px; }
}
