/**
 * JaapCount – Distraction-Free Zen Mode
 * Auto-dims peripheral chrome after inactivity
 */

.zen-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: transparent;
  z-index: var(--z-overlay);
  transition: background var(--duration-slow) var(--ease-smooth);
}

/* When Zen Mode is Active */
body[data-zen="true"] {
  background-color: #000000;
}

body[data-zen="true"] .counter-header {
  opacity: 0.15;
}

body[data-zen="true"] .counter-header:hover,
body[data-zen="true"] .counter-header:focus-within {
  opacity: 1;
}

body[data-zen="true"] .counter-controls {
  opacity: 0.15;
}

body[data-zen="true"] .counter-controls:hover,
body[data-zen="true"] .counter-controls:focus-within {
  opacity: 1;
}

body[data-zen="true"] .counter-stats {
  opacity: 0.2;
}

body[data-zen="true"] .counter-meta {
  opacity: 0.4;
  border-color: transparent;
  background: transparent;
}

body[data-zen="true"] .counter-number {
  transform: scale(1.08);
  text-shadow: 0 0 50px rgba(var(--color-accent-sandalwood-rgb), 0.4),
               0 0 100px rgba(var(--color-accent-sandalwood-rgb), 0.2);
}

body[data-zen="true"] .zen-overlay {
  background: rgba(0, 0, 0, 0.25);
}

/* Desktop hover helper to smoothly bring back chrome */
@media (hover: hover) {
  body[data-zen="true"] #counter-view:hover .counter-header,
  body[data-zen="true"] #counter-view:hover .counter-controls,
  body[data-zen="true"] #counter-view:hover .counter-stats {
    opacity: 0.7;
  }
}
