/* wwwroot/css/clock-core.css
   Shared clock visuals used by BOTH the configurator and any display-only pages/components.
   This file intentionally contains ONLY the clock rendering styles. Panel/layout styles live elsewhere. */

.clock {
  /* default size; JS may set --s to fit container */
  --s: 320px;
  /* base values used by CSS fallbacks (overwritten from JS) */
  --rimPx: 14px;
  --facePx: 34px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  position: relative;
  isolation: isolate;
  container-type: size;
}

/* Use this when you want the clock to fill available space while staying square */
.clock.fill-parent {
  height: 100% !important;
  width: auto !important;
  aspect-ratio: 1 / 1;
  max-width: 100%;
  max-height: 100%;
  /* scale with overall size; never zero */
  --rim: max(var(--rimPx, 14px), clamp(8px, calc(var(--s, 320px) * 0.022), 28px));
  --faceInset: max(var(--facePx, 34px), clamp(18px, calc(var(--s, 320px) * 0.09), 60px));
}

/* shared layers */
.bezel, .face, .sheen, svg.dial, .glass {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

/* 1) Outer rim */
.bezel {
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(120% 85% at 30% 15%, rgba(255,255,255,.06), transparent 45%),
    radial-gradient(circle at 50% 50%, #101d33 0%, #162942 62%, #224b69 82%, #2b5673 92%, #1a2c46 100%);
  /* rim thickness is --rim; colorized by JS via inline box-shadow */
  box-shadow:
    inset 0 0 0 var(--rim) rgba(0,0,0,.28),
    inset 0 0 0 1.5px rgba(255,255,255,.05);
}

/* 2) Face (inside rim + inset)  — the colors/positions are replaced by JS */
.face {
  inset: calc(var(--rim) + var(--faceInset));
  z-index: 2;
  background:
    radial-gradient(circle at 50% 48%, #6d4f2a 0%, #5c4526 46%, #48361d 72%, #2f2315 100%),
    conic-gradient(from 0deg, rgba(255,255,255,.05) 0 12deg, transparent 12deg 24deg);
  box-shadow:
    inset 0 0 0 2px rgba(213,180,120,.25),
    inset 0 24px 120px rgba(0,0,0,.45);
}

/* 3) Sheen (over face) */
.sheen {
  inset: calc(var(--rim) + var(--faceInset));
  z-index: 3;
  mix-blend-mode: screen;
  background: none;
}

/* 4) Ticks / numerals / hands SVG */
svg.dial {
  inset: calc(var(--rim) + var(--faceInset));
  width: auto;
  height: auto;
  display: block;
  z-index: 4;
}
svg.dial * { vector-effect: non-scaling-stroke; }

/* 5) Glass (inside rim, over everything) */
.glass {
  inset: var(--rim);
  z-index: 5;
  mix-blend-mode: screen;
  background: radial-gradient(160% 90% at 18% -10%,
              rgba(255,255,255,.22), rgba(255,255,255,.05) 45%, transparent 60%);
}