/* Fan light (owner, 19 Nov 2026): on mouse-over, light in the fan's own colours spins over the case's fans and the
   case floats. Pre-built PC page main picture (.mdpv-main) and the PC list cards (.mpc-card .mpc-img). Positions and
   colours per photo: data/pc_fan_map.php, markup: library/md_pc_fan_fx.php, maintained with the pc-fan-glow skill.
   Devices with a real mouse only; phones and tablets never show it. The light area = the picture's 8% padding, then
   a box of the photo's shape centred in it (container units), so every number in the map is a share of the photo.
   Raise ?v= on the links in view_custom_pc.php and select_custom_pc.php with every edit. */
.md-fx-on { position: relative; }
.md-fx-on .md-fx-area { display: none; }
@media (hover: hover) and (pointer: fine) {
  .md-fx-on .md-fx-area { position: absolute; inset: 8%; z-index: 1; display: grid; place-items: center; container-type: size; pointer-events: none; }
  .md-fx-on.md-fx-off .md-fx-area { display: none; }
  .md-fx-on .md-fx { position: relative; width: min(100cqw, calc(100cqh * var(--r, 1))); aspect-ratio: var(--r, 1); opacity: 0; transition: opacity .35s ease; }
  .md-fx-on .md-fan {
    position: absolute;
    aspect-ratio: 1;
    border-radius: 50%;
    /* three bright arcs in the fan's colours with dark gaps: the turning reads as spinning blades, even with one colour */
    background: conic-gradient(from 0deg, var(--c1, #00e5ff) 0deg, transparent 60deg, var(--c2, #a855f7) 120deg, transparent 180deg,
                var(--c3, #3b82f6) 240deg, transparent 300deg, var(--c1, #00e5ff) 360deg);
    opacity: .75;
    mix-blend-mode: screen;
    filter: blur(8px);
    animation: md-fan-spin 1.6s linear infinite paused;
  }
  .md-fx-on .md-grille {
    position: absolute;
    overflow: hidden;
    -webkit-mask: repeating-linear-gradient(to right, transparent 0 var(--closed), #000 var(--closed) 100%) 0 0 / var(--slat) 100%;
            mask: repeating-linear-gradient(to right, transparent 0 var(--closed), #000 var(--closed) 100%) 0 0 / var(--slat) 100%;
  }
  :is(.mdpv-main.md-fx-on:not(.md-fx-off):hover, .mpc-card:hover .md-fx-on) .md-fx { opacity: 1; animation: md-fan-float 4s ease-in-out infinite; }
  :is(.mdpv-main.md-fx-on:not(.md-fx-off):hover, .mpc-card:hover .md-fx-on) .md-fan { animation-play-state: running; }
  :is(.mdpv-main.md-fx-on:not(.md-fx-off):hover, .mpc-card:hover .md-fx-on) img { animation: md-fan-float 4s ease-in-out infinite; }
}
@keyframes md-fan-spin { to { transform: rotate(360deg); } }
@keyframes md-fan-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  .md-fx-on .md-fan, .md-fx-on .md-fx, .md-fx-on img { animation: none !important; }
}
