/* =============================================
   CW Interstitial + Lightbox v2 — style.css
   ============================================= */

.cwil-clickable {
  cursor: zoom-in !important;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cwil-clickable:hover {
  opacity: 0.9;
  transform: scale(1.01);
}

/* ── Overlay ─────────────────────────────────── */
#cwil-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
}
#cwil-overlay.cwil-open {
  display: flex;
  animation: cwil-fade .22s ease;
}

@keyframes cwil-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Inner ───────────────────────────────────── */
#cwil-inner {
  position: relative;
  max-width: min(92vw, 1200px);
  max-height: 92vh;
  cursor: default;
  animation: cwil-pop .3s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes cwil-pop {
  from { transform: scale(.82); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

#cwil-inner img {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 32px 96px rgba(0,0,0,.8);
  object-fit: contain;
}

/* ── Close button ────────────────────────────── */
#cwil-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  transition: transform .18s ease, background .18s ease, color .18s ease;
  z-index: 2;
  color: #111;
  padding: 0;
}
#cwil-close:hover {
  transform: scale(1.18) rotate(90deg);
  background: #e53935;
  color: #fff;
}
#cwil-close svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* ── Loading spinner ─────────────────────────── */
#cwil-spinner {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
}
#cwil-spinner.cwil-loading {
  display: flex;
}
#cwil-spinner::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cwil-spin .7s linear infinite;
}
@keyframes cwil-spin {
  to { transform: rotate(360deg); }
}
