/* =====================================================================
   Shared look & feel for both admin.html and view.html.
===================================================================== */
html,
body {
  height: 100%;
  margin: 0;
  background: #f5f7fa;
  color: #1f2937;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial,
    sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* --- Countdown ring (view.html) --------------------------------------
   Sized relative to the viewport (vmin = smaller of width/height) so it
   scales to fill the window on any beamer resolution/aspect ratio while
   staying a perfect circle, and reflows live on window resize. */
.ring-wrap {
  position: relative;
  width: min(80vw, 80vh);
  aspect-ratio: 1 / 1;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg); /* start the progress ring at 12 o'clock */
}

.ring-track {
  fill: none;
  stroke: #d7dee7;
  stroke-width: 18;
}

.ring-progress {
  fill: none;
  stroke-width: 18;
  stroke-linecap: round;
  transition: stroke 0.3s linear;
}

.ring-wrap.stopped .ring-progress {
  stroke: #b8c2cf !important;
}

.time-readout {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(28px, 14vmin, 160px);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #111827;
}

/* --- Admin controls (admin.html) ------------------------------------- */
.status-line {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.status-label {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.controls {
  display: flex;
  gap: 16px;
}

button {
  font-size: 16px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  cursor: pointer;
  transition: filter 0.15s ease, background-color 0.15s ease,
    border-color 0.15s ease;
}
button:hover {
  filter: brightness(1.03);
}
button:active {
  filter: brightness(0.97);
}

#powerBtn {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}
#powerBtn.is-off {
  background: #22c55e;
  border-color: #22c55e;
}

#resetBtn.is-off {
  background: #e5e7eb;
  color: #111827;
  border-color: #d1d5db;
}
#resetBtn.is-danger {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}

#delayBtn {
  background: #e5e7eb;
  color: #111827;
  border-color: #d1d5db;
}
#delayBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

