/* 포모도로(캘린더 2차, pomodoro.js) — 작업표시줄 묶음의 단추와 그 위 판(영역 A).
   판의 겉모양은 패치 노트 판(.note-popover + .clock-flyout-notifications)을 그대로 쓰고 여기서는 안만 놓는다.
   글자 크기는 homepage.css font-size 구역에 있다. */

/* 단추: 진행 중이면 테두리를 따라 도는 얇은 진행 줄 + 오른쪽 아래 남은 분 */
.pomodoro-btn { position: relative; }
.pomodoro-btn-ring {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; display: none;
}
.pomodoro-btn.is-running .pomodoro-btn-ring { display: block; }
.pomodoro-btn-ring-bar {
  fill: none !important;
  stroke: var(--focus-color) !important;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 100;
  vector-effect: non-scaling-stroke;
}
.pomodoro-btn.is-paused .pomodoro-btn-ring-bar { opacity: .45; }
.pomodoro-btn-badge {
  position: absolute; right: 1px; bottom: 1px;
  min-width: 14px; padding: 0 3px; border-radius: 7px;
  line-height: 14px; text-align: center; font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--focus-color);
  color: var(--focus-font-color, #fff) !important;
  pointer-events: none;
}
.pomodoro-btn-badge:empty { display: none; }

/* 판 */
.pomodoro-card { align-items: center; gap: 10px; }
.pomodoro-card .clock-flyout-head { align-self: stretch; margin-bottom: 0; }
.pomodoro-today { font-weight: 400; opacity: .75; font-variant-numeric: tabular-nums; }
.pomodoro-dial { position: relative; width: 168px; height: 168px; }
.pomodoro-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.pomodoro-ring circle { fill: none; stroke-width: 8; }
.pomodoro-ring-track { stroke: currentColor; opacity: .12; }
.pomodoro-ring-bar { stroke: var(--focus-color); stroke-linecap: round; stroke-dasharray: 100; }
.pomodoro-popover.is-break .pomodoro-ring-bar,
.pomodoro-btn.is-break .pomodoro-btn-ring-bar { stroke: color-mix(in srgb, var(--focus-color) 45%, #34c47c) !important; }
.pomodoro-dial-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.pomodoro-kind { opacity: .75; }
.pomodoro-time { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.pomodoro-todo {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600;
}
.pomodoro-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pomodoro-act { padding: 6px 12px; border-radius: 8px; cursor: pointer; }

/* 휴대폰: 화면 아래 폭을 다 쓰는 판(하단 시트처럼) */
@media (max-width: 640px) {
  .pomodoro-popover { left: 8px; right: 8px !important; }
  .pomodoro-popover .pomodoro-card { width: auto; }
  /* 묶음이 접혀 단추가 안 보이는 동안 진행 중이면 ⌃ 에 점을 찍는다 */
  .status:has(.pomodoro-btn.is-running) .status-tray-toggle { position: relative; }
  .status:has(.pomodoro-btn.is-running) .status-tray-toggle::after {
    content: ""; position: absolute; top: 5px; right: 5px;
    width: 7px; height: 7px; border-radius: 50%; background: var(--focus-color);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .pomodoro-ring-bar { transition: stroke-dashoffset 1s linear; }
  .pomodoro-act { transition: transform .08s ease; }
  .pomodoro-act:active { transform: translateY(1px); }
}
