/* MISC */

/* Klok */
.card[data-widget] {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fancy-clock {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
}

.clock-view {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
}
.card[data-widget='clock'] .clock-view {
  flex: 1;
  align-content: center;
}

.clock-face {
  width: clamp(140px, 26vw, 200px);
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  border: 2px solid var(--interactive-accent);
  background: radial-gradient(
    circle at 50% 50%,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.9) 60%,
    rgba(0, 0, 0, 0.95) 100%
  );
  box-shadow:
    0 0 20px rgba(0, 0, 0, 0.6),
    0 0 18px color-mix(in oklab, var(--interactive-accent) 50%, transparent);
}

.clock-face::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from 0deg,
      color-mix(in oklab, var(--interactive-accent) 55%, transparent) 0deg 2deg,
      transparent 2deg 30deg
    ),
    repeating-conic-gradient(
      from 0deg,
      color-mix(in oklab, var(--interactive-accent) 30%, transparent) 0deg 1deg,
      transparent 1deg 6deg
    );
  opacity: 0.75;
  z-index: 1;
}

.clock-hand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -100%) rotate(var(--rotation, 0deg));
  transform-origin: 50% 100%;
  border-radius: 999px;
  box-shadow: 0 0 12px color-mix(in oklab, var(--interactive-accent) 70%, transparent);
  z-index: 2;
}

.clock-hand.hour {
  width: 6px;
  height: 46px;
  background: color-mix(in oklab, var(--interactive-accent) 75%, white 20%);
}

.clock-hand.minute {
  width: 4px;
  height: 64px;
  background: color-mix(in oklab, var(--interactive-accent) 85%, white 10%);
}

.clock-hand.second {
  width: 2px;
  height: 72px;
  background: #facc15;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
}

.clock-center {
  position: absolute;
  inset: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--interactive-accent);
  box-shadow: 0 0 10px color-mix(in oklab, var(--interactive-accent) 70%, transparent);
  z-index: 3;
}

.clock-time {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: color-mix(in oklab, var(--text-normal) 92%, var(--interactive-accent) 8%);
  text-shadow: 0 0 12px color-mix(in oklab, var(--interactive-accent) 45%, transparent);
}

/* Weerbericht */
.wxbox {
  padding: 0.1rem 0.1rem;
  border-radius: 0.6rem;
  color: var(--text-normal);

  background: var(--background-secondary);

  /* glas-effect */
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);

  color: var(--text-normal);
  line-height: 1.5;
  text-align: center;
}
.wxline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}
.wx-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
  margin: 0.7rem 0;
}
.wx-detail {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  background: color-mix(in oklab, var(--background-secondary) 85%, transparent);
  border-radius: 0.6rem;
  padding: 0.4rem 0.3rem;
}
.wx-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.wx-value {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Timer */
.pomo-widget {
  background: var(--background-primary);
  display: grid;
  gap: 0.6rem;
  border-radius: 0.8rem;
  padding: 0.8rem;
}

.pomo-timer {
  background: color-mix(in oklab, var(--background-secondary) 92%, transparent);
  display: inline-block; /* shrink-to-fit */
  margin: 0 auto; /* centreer in flow */
  line-height: 1; /* strak rond de tekst */
  padding: 0.25em 0.55em; /* ruimte rond tekst, schaalt mee met font */
  border-radius: 0.6rem;
  color: var(--text-normal);
  text-align: center;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}
/* State-kleuren (iOS palette) */
.pomo-timer.focus {
  color: #34c759;
} /* iOS Green */
.pomo-timer.pause {
  color: #ff9f0a;
} /* iOS Orange */
.pomo-timer.break {
  color: #0a84ff;
} /* iOS Blue */

.pomo-sub {
  --pomo-sub: var(--muted);

  text-align: center;
  opacity: 0.8;
  font-size: 0.95rem;
  color: var(--pomo-sub);
}
.pomo-progress {
  height: 6px;
  background: color-mix(in oklab, var(--background-modifier-border) 70%, transparent);
  border-radius: 999px;
  overflow: hidden;
}
.pomo-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    color-mix(in oklab, var(--interactive-accent) 100%, white 50%),
    color-mix(in oklab, var(--interactive-accent) 80%, transparent)
  );
  transition: width 0.3s ease;
}
.pomobar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.pomo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.8rem;
  border-radius: 0.6rem;
  border: 1px solid var(--background-modifier-border);
  filter: none;
  background: color-mix(in oklab, var(--background-primary) 92%, var(--interactive-accent) 4%);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  user-select: none;
}
.pomo-btn:hover {
  filter: brightness(1.05);
}
.pomo-btn:active {
  transform: translateY(1px);
}
.pomo-btn:focus-visible {
  outline: 2px solid var(--interactive-accent);
  outline-offset: 2px;
}
.pomo-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
