/* Ubuntu Web — Clocks (GNOME Clocks) */

.app-clocks .header-title { pointer-events: auto; }

.app-clocks .clocks-switcher {
  display: inline-flex;
  background: var(--btn-bg);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.app-clocks .clocks-switch-btn {
  padding: 4px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg-dim);
  transition: background 0.12s ease, color 0.12s ease;
}
.app-clocks .clocks-switch-btn:hover { color: var(--fg); }
.app-clocks .clocks-switch-btn.active {
  background: var(--win-bg);
  color: var(--fg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
}

.app-clocks .clocks-root {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--win-bg);
}

.app-clocks .clocks-pane {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
}
.app-clocks .clocks-pane.active { display: flex; flex-direction: column; }

/* ---------- empty states ---------- */
.app-clocks .clocks-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--fg-faint);
  grid-column: 1 / -1;
  min-height: 260px;
}
.app-clocks .clocks-empty-icon { opacity: 0.5; margin-bottom: 8px; }
.app-clocks .clocks-empty-title { font-size: 19px; font-weight: 700; color: var(--fg-dim); }
.app-clocks .clocks-empty-sub { font-size: 13px; }

/* ---------- world ---------- */
.app-clocks .world-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  align-content: start;
  flex: 1;
}
.app-clocks .world-card {
  border-radius: 14px;
  padding: 18px 18px 16px;
  border: 1px solid var(--border);
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
}
.app-clocks .world-card.day {
  background: linear-gradient(160deg, #cfe5f4, #a8cbe8);
  color: #1a2c3d;
}
.app-clocks .world-card.night {
  background: linear-gradient(160deg, #232b45, #101527);
  color: #dde3f5;
}
.app-clocks .world-time {
  font-size: 30px;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.app-clocks .world-city { font-weight: 600; font-size: 14px; }
.app-clocks .world-sub { font-size: 12px; opacity: 0.72; }

/* ---------- alarms ---------- */
.app-clocks .alarm-list { align-self: stretch; max-width: 560px; margin: 0 auto; width: 100%; }
.app-clocks .alarm-time {
  font-size: 28px;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
}
.app-clocks .alarm-time.dim { color: var(--fg-faint); }

.app-clocks .alarm-time-inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}
.app-clocks .alarm-colon { font-size: 24px; font-weight: 700; }
.app-clocks .alarm-spin {
  width: 72px;
  font-size: 22px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.app-clocks .clocks-dialog-body { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.app-clocks .city-results { display: flex; flex-direction: column; gap: 2px; min-height: 120px; }
.app-clocks .city-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  text-align: left;
  color: var(--fg);
}
.app-clocks .city-row:hover { background: var(--hover); }
.app-clocks .city-row.selected { background: rgba(var(--accent-rgb), 0.18); }
.app-clocks .city-row-name { font-weight: 500; }
.app-clocks .city-row-sub { font-size: 12px; color: var(--fg-dim); }

/* ---------- stopwatch ---------- */
.app-clocks .clocks-stopwatch.active,
.app-clocks .clocks-timer.active { align-items: center; }

.app-clocks .sw-display {
  font-family: var(--font-mono);
  font-size: 58px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  margin: 34px 0 18px;
}
.app-clocks .sw-controls, .app-clocks .timer-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.app-clocks .sw-main { min-width: 110px; padding: 9px 22px; font-size: 15px; }
.app-clocks .sw-controls .btn.pill:not(.sw-main),
.app-clocks .timer-controls .btn.pill:not(.sw-main) { min-width: 90px; padding: 9px 18px; }

.app-clocks .sw-laps { width: 100%; max-width: 480px; }
.app-clocks .lap-row { display: flex; font-variant-numeric: tabular-nums; }
.app-clocks .lap-num { flex: 1; font-weight: 600; }
.app-clocks .lap-split { flex: 1; text-align: center; color: var(--fg-dim); font-family: var(--font-mono); }
.app-clocks .lap-total { flex: 1; text-align: right; font-family: var(--font-mono); }

/* ---------- timer ---------- */
.app-clocks .timer-ring-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 16px 0 12px;
}
.app-clocks .ring-bg { stroke: var(--btn-bg); }
.app-clocks .ring-fg { stroke: var(--accent); transition: stroke-dashoffset 0.1s linear; }
.app-clocks .timer-ring-wrap.flash { animation: clocks-ring-flash 0.7s ease 4; }
@keyframes clocks-ring-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
.app-clocks .timer-digits {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 42px;
  font-variant-numeric: tabular-nums;
}

.app-clocks .timer-chips { display: flex; gap: 8px; margin-bottom: 14px; }
.app-clocks .timer-custom {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}
.app-clocks .timer-spin {
  width: 62px;
  text-align: center;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.app-clocks .timer-spin-label { margin-right: 6px; }
