/* clock.zemo.rs: one watch filling the screen. The picture is drawn by Go
   (WebAssembly, tv-app/internal/clock) into the canvas at the screen's own
   pixel size; everything outside the case is black, like the TV's picture. */

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
}

.clock {
  position: fixed;
  inset: 0;
}

.clock-watch {
  display: block;
  width: 100%;
  height: 100%;
}

.clock-status {
  position: fixed;
  inset: 50% 16px auto;
  transform: translateY(-50%);
  margin: 0;
  text-align: center;
  color: var(--z-text);
}

.clock-status[hidden] {
  display: none;
}

/* The only control. It sits in a corner, which is outside the case at every
   aspect ratio, and fades after a few still seconds so the watch is alone;
   keyboard focus or a pointer brings it back. */
.clock-fullscreen {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  transition: opacity .3s ease;
}

.clock-idle .clock-fullscreen:not(:focus-visible) {
  opacity: 0;
  pointer-events: none;
}

.clock-idle,
.clock-idle .clock-watch {
  cursor: none;
}

@media (prefers-reduced-motion: reduce) {
  .clock-fullscreen {
    transition: none;
  }
}
