/* ── Screen Test — tool-specific styles ─────────────────────────────────────
   Global styles are inherited from /css/style.css.
   All colours reference CSS custom properties where possible.
   ────────────────────────────────────────────────────────────────────────── */

/* ── Instructions list ─────────────────────────────────────────────────── */
.screen-test-instructions {
  padding-left: 1.25rem;
  display: grid;
  gap: 0.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Test mode grid ─────────────────────────────────────────────────────── */
.test-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* ── Test mode card ─────────────────────────────────────────────────────── */
.test-mode-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--tool-surface-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.test-mode-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-accent);
}

.test-mode-card-body {
  padding: 1rem 1.125rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.test-mode-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.test-mode-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.test-mode-start {
  align-self: flex-start;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  min-height: 38px;
}

/* ── Preview swatches ───────────────────────────────────────────────────── */
.test-mode-swatch {
  height: 96px;
  width: 100%;
  flex-shrink: 0;
}

.swatch-dead-pixel {
  background: linear-gradient(
    to right,
    #ff0000 12.5%,
    #00ff00 12.5% 25%,
    #0000ff 25% 37.5%,
    #ffffff 37.5% 50%,
    #000000 50% 62.5%,
    #00ffff 62.5% 75%,
    #ff00ff 75% 87.5%,
    #ffff00 87.5%
  );
}

.swatch-gradient {
  background: linear-gradient(to right, #000000, #ffffff);
}

.swatch-checkerboard {
  background:
    repeating-conic-gradient(#000 0% 25%, #fff 0% 50%)
    0 0 / 20px 20px;
}

.swatch-backlight {
  background: #000000;
  border-bottom: 1px solid var(--border-color);
}

.swatch-uniformity {
  background: #808080;
}

.swatch-fixer {
  background: linear-gradient(to right, #ff0000 20%, #00ff00 40%, #0000ff 60%, #ffffff 80%, #000000);
}

.swatch-response {
  background: linear-gradient(to right, #000000 50%, #ffffff 50%);
}

/* ── Fullscreen overlay ─────────────────────────────────────────────────── */
.screen-test-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  cursor: none;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: stretch;
}

.screen-test-overlay.cursor-visible {
  cursor: default;
}

.screen-test-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ── HUD ────────────────────────────────────────────────────────────────── */
.screen-test-hud {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  max-width: 300px;
  min-width: 180px;
  transition: opacity 0.5s ease;
  pointer-events: auto;
  user-select: none;
  z-index: 1;
}

.screen-test-hud.hud-hidden {
  opacity: 0;
  pointer-events: none;
}

.hud-info {
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.hud-controls {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.75rem;
}

.hud-controls .hud-row {
  margin-top: 0.25rem;
}

.hud-timer {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
}

/* Fixer-specific HUD controls */
.hud-fixer-btns {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.hud-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
  pointer-events: auto;
}

.hud-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Speed selector */
.hud-speed-btns {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.hud-speed-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.8);
  border-radius: 5px;
  padding: 0.2rem 0.45rem;
  font-size: 0.7rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  pointer-events: auto;
}

.hud-speed-btn.active {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  font-weight: 600;
}

/* ── Stuck pixel fixer square ───────────────────────────────────────────── */
.fixer-square {
  position: absolute;
  width: 100px;
  height: 100px;
  border: 3px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  cursor: grab;
  touch-action: none;
  z-index: 2;
  background: #ff0000;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.fixer-square.is-dragging {
  cursor: grabbing;
}

/* ── Photosensitivity warning banner ────────────────────────────────────── */
.photosensitivity-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: #fff8e1;
  border: 1.5px solid #f59e0b;
  border-radius: var(--tool-surface-radius, 8px);
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #7c4a00;
  margin-bottom: 1.5rem;
}

.photosensitivity-warning > span:first-child {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.5;
}

/* ── Confirmation modal ──────────────────────────────────────────────────── */
.photosensitivity-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.photosensitivity-modal-box {
  background: var(--bg-card, #fff);
  border: 1.5px solid var(--border-color, #e5e7eb);
  border-radius: var(--tool-surface-radius, 8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  padding: 2rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
}

.photosensitivity-modal-icon {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  line-height: 1;
  color: #f59e0b;
}

.photosensitivity-modal-body {
  font-size: 0.9375rem;
  color: var(--text-secondary, #6b7280);
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.photosensitivity-modal-btns {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

