/* A Fidget drawn in its own look, and the swatches that choose it
   (assets/js/components/device_look.mjs). */

.cf-look-panel { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 18px; }
.cf-look-stage { display: flex; justify-content: center; }

.cf-look-device {
  position: relative;
  flex: none;
  aspect-ratio: 900 / 1192;
  user-select: none;
  -webkit-user-select: none;
}
/* The screen sits BEHIND the chassis: the cut-out does the clipping. */
.cf-look-screen {
  position: absolute;
  z-index: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #040507;
}
.cf-look-screen-text {
  color: var(--cf-look-screen, #e8f2ff);
  font-family: var(--cf-font-pixel);
  line-height: 1;
  letter-spacing: .04em;
  white-space: nowrap;
  text-shadow: 0 0 3px var(--cf-look-screen, #e8f2ff);
}
.cf-look-chassis {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.cf-look-slider { position: absolute; z-index: 2; pointer-events: none; }
.cf-look-slider-thumb {
  position: absolute;
  left: 2.5%;
  top: 13.5%;
  width: 85.5%;
  height: 70%;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45));
}
/* Anodized tint, masked by the render's own alpha so the shading stays. */
.cf-look-tint {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  -webkit-mask-image: url('/assets/img/cf-face.png');
  mask-image: url('/assets/img/cf-face.png');
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.cf-look-tint-color { mix-blend-mode: color; opacity: .85; }
.cf-look-tint-multiply { mix-blend-mode: multiply; opacity: .22; }

.cf-look-pickers { display: flex; flex-direction: column; gap: 7px; }
.cf-look-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cf-look-label {
  width: 46px;
  color: var(--cf-ink-mute);
  font: 9px var(--cf-font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.cf-look-swatch {
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  background: var(--cf-swatch, transparent);
  cursor: pointer;
  outline-offset: 1px;
}
/* Screen colours are small glowing squares, case colours are circles. */
.cf-look-swatch-screen { border-radius: 3px; box-shadow: 0 0 6px color-mix(in srgb, var(--cf-swatch, transparent) 33%, transparent); }
.cf-look-swatch-case { border-radius: 50%; }
.cf-look-swatch[aria-pressed="true"] { outline: 2px solid var(--cf-ink); }
.cf-look-swatch:disabled { cursor: default; opacity: .4; }
.cf-look-swatch:focus-visible { outline: 2px solid var(--cf-cyan); outline-offset: 3px; }
.cf-look-status {
  margin: 0;
  color: var(--cf-yellow);
  font: 11px/1.6 var(--cf-font-mono);
}
.cf-look-status[hidden] { display: none; }

/* Touch: bigger targets, same look. */
@media (pointer: coarse) {
  .cf-look-row { gap: 10px; }
  .cf-look-swatch { width: 26px; height: 26px; }
}
