/* ============ Demo lightbox (popup site preview) ============ */
.demo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2.5vw, 2rem);
  background: rgba(8, 8, 12, 0.78);
  backdrop-filter: blur(6px);
}
.demo-lightbox[hidden] { display: none; }
.demo-lightbox-panel {
  position: relative;
  width: min(1280px, 100%);
  height: min(88vh, 100%);
  background: #0E0E12;
  border: 1px solid rgba(157, 78, 221, 0.45);
  border-radius: 16px;
  box-shadow: 0 0 60px rgba(157, 78, 221, 0.25);
  overflow: hidden;
  display: flex;
}
.demo-lightbox-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.demo-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(14, 14, 18, 0.85);
  color: #ECECF2;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.demo-lightbox-close:hover {
  background: #7B2CBF;
  transform: scale(1.08);
}
.demo-lightbox-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: #9A9AA6;
  font-size: 1.05rem;
  background: #0E0E12;
  z-index: 1;
}
.demo-lightbox-loading[hidden] { display: none; }
.demo-lightbox-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 2rem;
  text-align: center;
  background: #0E0E12;
}
.demo-lightbox-fallback[hidden] { display: none; }
.demo-lightbox-fallback-text {
  margin: 0;
  color: #C9C9D4;
  font-size: 1.05rem;
  max-width: 420px;
  line-height: 1.55;
}
.demo-lightbox-open { width: auto; }
body.lightbox-open { overflow: hidden; }
@media (max-width: 640px) {
  .demo-lightbox { padding: 0.5rem; }
  .demo-lightbox-panel { height: 94vh; border-radius: 12px; }
}

/* Whole demo card is clickable */
[data-demo-url] { cursor: pointer; }
