/* =========================================================
   Elementor Lantern Light Gallery — Frontend Styles
   ========================================================= */

/* ── Wrapper ── */
.ellg-scene-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  user-select: none;
}

/* ── Scene Container ── */
.ellg-scene-container {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  cursor: none; /* custom lantern cursor */
  background-color: #0d0d0d;
  touch-action: none;
}

/* ── Canvas ── */
.ellg-canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* ── Lantern SVG holder ── */
.ellg-lantern-holder {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, -100%);
  z-index: 20;
  filter: drop-shadow(0 0 12px rgba(255, 200, 60, 0.7));
  transition: filter 0.15s ease;
  will-change: transform, filter;
}

.ellg-lantern-svg {
  width: 60px;
  height: auto;
  display: block;
}

/* ── Lantern glow pulse ── */
@keyframes ellg-lantern-flicker {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 200, 60, 0.70)); }
  25%       { filter: drop-shadow(0 0 16px rgba(255, 200, 60, 0.90)); }
  50%       { filter: drop-shadow(0 0  8px rgba(255, 200, 60, 0.60)); }
  75%       { filter: drop-shadow(0 0 20px rgba(255, 210, 80, 0.95)); }
}

.ellg-lantern-holder {
  animation: ellg-lantern-flicker 3s ease-in-out infinite;
}

/* ── Instructions ── */
.ellg-instructions {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.8s ease;
}

.ellg-instructions.ellg-hide {
  opacity: 0;
}

.ellg-instructions-text {
  display: inline-block;
  color: rgba(255, 210, 120, 0.75);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.4);
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 200, 60, 0.18);
  backdrop-filter: blur(4px);
  animation: ellg-pulse-hint 2.5s ease-in-out infinite;
}

@keyframes ellg-pulse-hint {
  0%, 100% { opacity: 0.75; }
  50%       { opacity: 0.35; }
}

/* ── Lightbox ── */
.ellg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ellg-lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  cursor: pointer;
}

.ellg-lightbox-content {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 1100px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: ellg-lb-appear 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ellg-lb-appear {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Flash effect */
.ellg-lightbox-flash {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.05s ease;
}

.ellg-lightbox-flash.ellg-flash-active {
  animation: ellg-flash-anim 0.55s ease forwards;
}

@keyframes ellg-flash-anim {
  0%   { opacity: 1; }
  60%  { opacity: 0.5; }
  100% { opacity: 0; }
}

/* Image */
.ellg-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(255, 200, 60, 0.25);
}

/* Caption */
.ellg-lightbox-caption {
  margin-top: 16px;
  text-align: center;
  color: #f0e0b0;
  padding: 0 20px;
}

.ellg-lightbox-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: #ffe8a0;
}

.ellg-lightbox-desc {
  font-size: 0.9rem;
  color: rgba(240, 224, 176, 0.7);
  margin: 0;
  line-height: 1.55;
}

/* Close button */
.ellg-lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease;
  padding: 0;
}

.ellg-lightbox-close:hover {
  background: rgba(255, 200, 60, 0.2);
  transform: scale(1.1);
}

/* ── Gyro permission dialog ── */
.ellg-gyro-prompt {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  background: rgba(20, 14, 5, 0.92);
  border: 1px solid rgba(255, 200, 60, 0.3);
  border-radius: 12px;
  padding: 24px 28px;
  text-align: center;
  color: #f0e0b0;
  max-width: 280px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

.ellg-gyro-prompt p {
  margin: 0 0 18px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.ellg-gyro-prompt-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.ellg-btn {
  padding: 8px 22px;
  border: none;
  border-radius: 20px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ellg-btn:hover {
  transform: translateY(-1px);
}

.ellg-btn-primary {
  background: #FFD580;
  color: #1a1000;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(255, 213, 128, 0.4);
}

.ellg-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .ellg-scene-container {
    height: 380px;
  }

  .ellg-lantern-svg {
    width: 44px;
  }

  .ellg-lightbox-title {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .ellg-scene-container {
    height: 300px;
    cursor: default;
  }

  .ellg-lightbox-close {
    top: -36px;
    width: 30px;
    height: 30px;
  }
}

/* ── No-JS fallback ── */
.no-js .ellg-canvas {
  display: none;
}
