/* ============================================================
   Focus Timer (Pomodoro) — floating widget
   Bottom-left so it never collides with the focus-mode exit pill
   (which lives bottom-right). Theme-aware via core tokens.
   ============================================================ */

#focus-timer.ft-card {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 640;
  width: 236px;
  padding: 14px 16px 16px;
  background: var(--bg-modal);
  border: 1px solid var(--border);
  border-radius: var(--radius-pane);
  box-shadow: var(--shadow-popover);
  font-family: var(--font-body, "Instrument Sans", system-ui, sans-serif);
  color: var(--text);
  animation: ft-pop 0.16s var(--ease-out, ease);
}
#focus-timer.hidden { display: none; }

@keyframes ft-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.ft-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.ft-phase-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.ft-card.ft-break .ft-phase-label { color: #1a9d6e; }
.ft-head-actions { display: flex; gap: 2px; }
.ft-icon {
  border: none;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.ft-icon:hover { background: var(--bg-hover); color: var(--text); }

.ft-ring-wrap {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 4px auto 10px;
}
.ft-ring { width: 148px; height: 148px; display: block; }
.ft-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}
.ft-ring-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s linear, stroke 0.2s;
}
.ft-card.ft-break .ft-ring-fg { stroke: #1a9d6e; }
.ft-time {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 30px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--text);
}

.ft-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}
.ft-btn {
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 7px 20px;
  border-radius: var(--radius-ctl);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.06s;
}
.ft-btn:active { transform: translateY(1px); }
.ft-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  min-width: 96px;
}
.ft-primary:hover { background: var(--accent-hover); }
.ft-card.ft-break .ft-primary { background: #1a9d6e; border-color: #1a9d6e; }
.ft-card.ft-break .ft-primary:hover { background: #158a60; }
.ft-controls .ft-icon {
  border: 1px solid var(--border);
  width: 34px;
  height: 34px;
  font-size: 15px;
}

.ft-meta {
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}

.ft-config {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ft-config.hidden { display: none; }
.ft-cfg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-light);
  gap: 8px;
}
.ft-cfg-row input[type="number"] {
  width: 52px;
  padding: 4px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  text-align: right;
  margin-left: auto;
}
.ft-cfg-chime {
  justify-content: flex-start;
  gap: 8px;
}
.ft-cfg-chime input { accent-color: var(--accent); }
.ft-cfg-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}
.ft-cfg-ambient {
  padding: 4px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  outline: none;
  max-width: 120px;
}
.ft-cfg-ambient:focus { border-color: var(--accent); }
.ft-cfg-ambient-vol {
  width: 90px;
  accent-color: var(--accent);
  cursor: pointer;
}

@media (max-width: 640px) {
  #focus-timer.ft-card { left: 12px; right: 12px; bottom: 12px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  #focus-timer.ft-card { animation: none; }
  .ft-ring-fg { transition: none; }
}

