/* kotschmar.net — Pomodoro-Timer
   Ergaenzt stil.css; Farben je Phase ueber --phase. */

.pomo {
  --phase: #ff3b30;
  --phase-soft: rgba(255, 59, 48, .12);
  --phase-text: #fff;
  max-width: 440px;
  padding-top: 24px;
  padding-bottom: 32px;
  text-align: center;
}

.pomo[data-phase="kurz"], .pomo[data-phase="lang"] {
  --phase: #248a3d;
  --phase-soft: rgba(52, 199, 89, .14);
}

@media (prefers-color-scheme: dark) {
  .pomo { --phase: #ff453a; --phase-soft: rgba(255, 69, 58, .18); }
  .pomo[data-phase="kurz"], .pomo[data-phase="lang"] {
    --phase: #30d158;
    --phase-soft: rgba(48, 209, 88, .18);
    --phase-text: #1c1c1e;
  }
}

.pomo button { font: inherit; color: inherit; cursor: pointer; }

.pomo button:focus-visible { border-radius: inherit; }

/* ---------- Phasenwahl ---------- */

.segment {
  display: flex;
  padding: 2px;
  border-radius: 9px;
  background: var(--fill);
}

.segment button {
  flex: 1;
  min-width: 0;
  padding: 6px 4px;
  font-size: 13px;
  font-weight: 500;
  border: 0;
  border-radius: 7px;
  background: transparent;
}

.segment button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }

@media (prefers-color-scheme: dark) {
  .segment button[aria-pressed="true"] { background: #636366; }
}

/* ---------- Uhr ---------- */

.uhr { position: relative; width: min(280px, 100%); margin: 26px auto 8px; aspect-ratio: 1; }

.uhr svg { display: block; width: 100%; height: 100%; }

.uhr circle { fill: none; stroke-width: 9; }

.uhr .spur { stroke: var(--phase-soft); }

.uhr .fortschritt { stroke: var(--phase); stroke-linecap: round; transition: stroke-dashoffset .3s linear; }

.anzeige { position: absolute; inset: 0; display: grid; place-content: center; }

.zeit {
  font-size: clamp(52px, 17vw, 68px);
  font-weight: 250;
  line-height: 1.05;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.phase { margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--phase); }

.runde { margin: 0 0 18px; color: var(--text-muted); font-size: 14px; }

.punkte { display: inline-flex; gap: 6px; margin-left: 10px; vertical-align: 1px; }

.punkte i { width: 8px; height: 8px; border-radius: 50%; background: var(--phase-soft); }

.punkte i.voll { background: var(--phase); }

/* ---------- Knoepfe ---------- */

.knoepfe { display: flex; justify-content: center; gap: 10px; }

.knoepfe button {
  min-width: 128px;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 600;
  border: 0;
  border-radius: 10px;
}

.knoepfe .haupt {
  color: var(--phase-text);
  background: var(--phase);
  box-shadow: inset 0 .5px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .15);
}

.knoepfe .neben { background: var(--fill); }

.knoepfe button:active { transform: scale(.98); }

/* ---------- Einstellungen ---------- */

.einstellungen {
  margin-top: 28px;
  text-align: left;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.einstellungen summary { padding: 13px 16px; font-weight: 600; cursor: pointer; border-radius: var(--radius); }

.einstellungen .felder, .einstellungen .schalter { padding: 0 16px; }

.einstellungen label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: .5px solid var(--separator);
  font-size: 15px;
}

.einstellungen label span { flex: none; color: var(--text-muted); font-size: 14px; }

/* Schalter wie in den macOS-Systemeinstellungen: Text links, Schalter rechts */
.einstellungen .schalter label { cursor: pointer; }

.einstellungen input[type="number"] {
  width: 64px;
  padding: 5px 8px;
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text);
  background: var(--bg);
  border: .5px solid var(--separator);
  border-radius: 6px;
}

.einstellungen input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: none;
  order: 2;
  width: 38px;
  height: 22px;
  margin: 0;
  border-radius: 11px;
  background: var(--fill);
  cursor: pointer;
  transition: background .2s ease;
}

.einstellungen input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 0 0 .5px rgba(0, 0, 0, .06);
  transition: transform .2s ease;
}

.einstellungen input[type="checkbox"]:checked { background: #34c759; }

.einstellungen input[type="checkbox"]:checked::before { transform: translateX(16px); }

.einstellungen input[type="checkbox"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }

.einstellungen .hinweis {
  margin: 4px 16px 0;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  background: var(--accent-soft);
}

.einstellungen .klein { margin: 8px 16px 0; padding: 10px 0 14px; border-top: .5px solid var(--separator); font-size: 13px; color: var(--text-muted); }

.link { padding: 0; border: 0; background: none; color: var(--accent) !important; text-decoration: underline; font-size: inherit !important; }

.tipp { margin: 18px 0 0; font-size: 13px; color: var(--text-muted); }

@media (hover: none) { .tipp { display: none; } }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .uhr .fortschritt, .einstellungen input[type="checkbox"], .einstellungen input[type="checkbox"]::before { transition: none; }
}
