/* POINT COUNTER (2026-10-21) — pinball score display on Skrá.
   Black panel, chrome-style olive frame, glowing dot-matrix digits and a
   row of bulbs that light up with the day. See js/pointcounter.js.
   Brand colours only: the glow colour (--glow) moves
   olive → blush → blue → green → white (Level 10). */
#page-checkin.pc-has-counter { padding-bottom: calc(var(--nav-h) + 104px); }

.pc-counter {
  --glow: #757263;
  position: fixed;
  left: 16px;
  bottom: calc(var(--nav-h) + 16px);
  z-index: 900;                       /* just under the assistant FAB (901) */
  height: 58px;
  min-width: 168px;
  padding: 4px 16px 0 14px;
  box-sizing: border-box;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  /* black glass panel with a chrome rim */
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,0.07), rgba(255,255,255,0) 60%),
    #000000;
  border: 3px solid #757263;
  box-shadow:
    inset 0 0 0 1px #3D3D3D,
    inset 0 2px 10px rgba(0,0,0,0.9),
    0 0 0 1px #3D3D3D,
    0 1px 0 2px rgba(255,255,255,0.35),
    0 8px 20px rgba(0,0,0,0.35);
  font-variant-numeric: tabular-nums;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transform-origin: 30% 50%;
  transition: border-color 0.45s ease;
}

/* Label: small lit caps, like the "BALL 1" / "PLAYER 1" text */
.pc-label {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--glow);
  text-shadow: 0 0 6px var(--glow);
  white-space: nowrap;
  transition: color 0.45s ease;
}
.pc-of { font-size: 10px; font-weight: 500; letter-spacing: 0.06em; text-transform: none; color: #FFFFFF; opacity: 0.55; text-shadow: none; }
.pc-snd { font-size: 10px; opacity: 0.9; }

/* Dot-matrix digits */
.pc-num {
  position: relative;
  display: flex;
  font-family: system-ui, -apple-system, "Helvetica Neue", sans-serif;
  font-size: 38px;
  font-weight: 900;
  height: 1.05em;
  line-height: 1.05em;
  /* brighter than the glow so the number reads at a glance */
  color: #FFFFFF;
  color: color-mix(in srgb, var(--glow) 55%, #FFFFFF);
  text-shadow: 0 0 3px var(--glow), 0 0 12px var(--glow), 0 0 22px var(--glow);
  transition: color 0.45s ease;
}
/* LED dot grid laid over the digits */
.pc-num::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(0,0,0,0) 0 1.15px, #000000 1.5px);
  background-size: 3.2px 3.2px;
  opacity: 0.55;
}
.pc-digit { display: inline-block; width: 0.62em; height: 1.05em; overflow: hidden; text-align: center; }
.pc-reel { display: flex; flex-direction: column; transition: transform 0.16s cubic-bezier(.3,1.5,.6,1); }
.pc-reel span { display: block; height: 1.05em; line-height: 1.05em; }
.pc-digit.pc-dim { opacity: 0.14; }
.pc-num.pc-tick { animation: pc-tick 0.16s ease-out; }
@keyframes pc-tick { 50% { transform: scale(1.1); filter: brightness(1.6); } }

/* Old progress bar is replaced by the bulbs */
.pc-bar { display: none; }

/* Bulb row along the top rim */
.pc-bulbs {
  position: absolute;
  top: -6px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.pc-bulb {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #3D3D3D;
  border: 1px solid #757263;
  box-sizing: border-box;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.pc-bulb.on {
  background: var(--glow);
  border-color: #FFFFFF;
  box-shadow: 0 0 6px var(--glow), 0 0 12px var(--glow);
}

/* The day grows: the glow colour changes */
.pc-s0 { --glow: #E1CCBE; }
.pc-s0 .pc-num { color: #E1CCBE; text-shadow: none; opacity: 0.75; }
.pc-s1 { --glow: #E1CCBE; }
.pc-s2 { --glow: #C8DCE5; }
.pc-s3 { --glow: #758F60; border-color: #758F60; }
.pc-l10 { --glow: #FFFFFF; border-color: #758F60; animation: pc-glow 1.8s ease-in-out infinite; }
.pc-l10 .pc-label { color: #C8DCE5; text-shadow: 0 0 6px #C8DCE5; }
.pc-l10 .pc-num { text-shadow: 0 0 4px #FFFFFF, 0 0 12px #758F60, 0 0 22px #758F60; }
/* Level 10: bulbs chase around like an attract-mode light show */
.pc-l10 .pc-bulb.on { animation: pc-chase 0.9s linear infinite; }
@keyframes pc-chase {
  0%, 60%, 100% { background: #758F60; box-shadow: 0 0 6px #758F60; }
  20%           { background: #FFFFFF; box-shadow: 0 0 8px #FFFFFF, 0 0 16px #758F60; }
}
@keyframes pc-glow {
  0%, 100% { box-shadow: inset 0 0 0 1px #3D3D3D, inset 0 2px 10px rgba(0,0,0,0.9), 0 0 0 1px #3D3D3D, 0 1px 0 2px rgba(255,255,255,0.35), 0 8px 20px rgba(0,0,0,0.35), 0 0 0 0 rgba(117,143,96,0.6); }
  50%      { box-shadow: inset 0 0 0 1px #3D3D3D, inset 0 2px 10px rgba(0,0,0,0.9), 0 0 0 1px #3D3D3D, 0 1px 0 2px rgba(255,255,255,0.35), 0 8px 20px rgba(0,0,0,0.35), 0 0 0 10px rgba(117,143,96,0); }
}

/* Explosion */
.pc-counter.pc-boom { animation: pc-boom 0.75s cubic-bezier(.2,1.6,.4,1), pc-glow 1.8s ease-in-out 0.75s infinite; }
.pc-s0.pc-boom, .pc-s1.pc-boom, .pc-s2.pc-boom, .pc-s3.pc-boom { animation: pc-boom 0.75s cubic-bezier(.2,1.6,.4,1); }
@keyframes pc-boom {
  0%   { transform: scale(1); filter: brightness(1); }
  22%  { transform: scale(1.38) rotate(-4deg); filter: brightness(1.8); }
  42%  { transform: scale(0.94) rotate(3deg); }
  62%  { transform: scale(1.12) rotate(-1deg); }
  100% { transform: scale(1); filter: brightness(1); }
}
.pc-ring {
  position: absolute; inset: -4px; border-radius: 14px;
  border: 3px solid #758F60; pointer-events: none;
  animation: pc-ring 0.9s ease-out forwards;
}
@keyframes pc-ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.9, 2.4); opacity: 0; } }
.pc-spark {
  position: absolute; left: 50%; top: 50%;
  width: 13px; height: 13px; margin: -6px 0 0 -6px;
  border-radius: 2px; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(61,61,61,0.12);
  animation: pc-spark 1s cubic-bezier(.15,.7,.3,1) forwards;
}
.pc-spark-round { border-radius: 50%; width: 10px; height: 10px; }
@keyframes pc-spark {
  0%   { transform: translate(0,0) scale(1.2) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.7) rotate(var(--rot)); opacity: 0; }
}

/* Floating "+n" and the big LEVEL 10! label */
.pc-float {
  position: absolute; left: 14px; bottom: calc(100% + 6px);
  font-weight: 800; white-space: nowrap; pointer-events: none;
  color: #758F60; text-shadow: 0 1px 0 #FFFFFF, 0 0 6px #FFFFFF;
  animation: pc-float 1.3s ease-out forwards;
}
.pc-gain { font-size: 20px; left: auto; right: 18px; }
.pc-float-big { font-size: 30px; color: #757263; letter-spacing: 0.02em; }
.pc-float-meas { font-size: 24px; color: #3D3D3D; }
@keyframes pc-float {
  0%   { opacity: 0; transform: translateY(12px) scale(0.6); }
  18%  { opacity: 1; transform: translateY(-4px) scale(1.18); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-48px) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .pc-reel, .pc-counter, .pc-bulb { transition: none; }
  .pc-l10, .pc-counter.pc-boom, .pc-num.pc-tick, .pc-l10 .pc-bulb.on { animation: none; }
}

/* "Vantar 2 í Level 10" — the last two habits get a gentle blink */
.pc-close .pc-of-txt { color: #FFFFFF; opacity: 1; animation: pc-blink 1.2s ease-in-out infinite; }
.pc-close .pc-of { opacity: 1; }
.pc-l10 .pc-of { opacity: 0.9; }
@keyframes pc-blink { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .pc-close .pc-of-txt { animation: none; } }

/* Level 10 confetti rain — full screen, never blocks taps */
.pc-confetti { position: fixed; inset: 0; z-index: 2000; pointer-events: none; overflow: hidden; }
.pc-conf {
  position: absolute; top: -20px;
  width: 9px; height: 14px; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(61,61,61,0.08);
  animation-name: pc-conf-fall;
  animation-timing-function: cubic-bezier(.25,.6,.45,1);
  animation-fill-mode: forwards;
}
.pc-conf-round { width: 10px; height: 10px; border-radius: 50%; }
.pc-conf-strip { width: 5px; height: 18px; }
@keyframes pc-conf-fall {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translate(var(--drift), 110vh) rotate(var(--spin)); opacity: 0; }
}
