/* ============================================================
   Prism Gallery 98 — Frontend & Editor Styles
   ============================================================ */

/* ── Widget Wrapper ── */
.pg98-widget {
  position: relative;
  display: block;
  width: 100%;
  font-family: system-ui, -apple-system, sans-serif;
}

/* ── Canvas Container ── */
.pg98-canvas-wrap {
  position: relative;
  width: 100%;
  height: 540px;
  background-color: #050510;
  overflow: hidden;
  border-radius: 0;
}

@media (max-width: 768px) {
  .pg98-canvas-wrap { height: 400px; }
}
@media (max-width: 480px) {
  .pg98-canvas-wrap { height: 320px; }
}

/* ── Canvas ── */
.pg98-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* ── Overlay ── */
.pg98-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 16px;
  gap: 10px;
}

/* ── Swipe Hint ── */
.pg98-swipe-hint {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 6px 16px;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  letter-spacing: 0.04em;
  pointer-events: none;
  transition: opacity 1.2s ease;
  white-space: nowrap;
}

/* ── Morph Label ── */
.pg98-morph-label {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 4px 12px;
  color: rgba(200,200,255,0.85);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
  min-width: 60px;
  text-align: center;
}

/* ── Morph Controls ── */
.pg98-morph-controls {
  display: flex;
  gap: 8px;
  pointer-events: all;
  flex-wrap: wrap;
  justify-content: center;
}

.pg98-morph-btn {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(160,160,255,0.2);
  border-radius: 20px;
  color: rgba(200,200,255,0.8);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  outline: none;
}

.pg98-morph-btn:hover {
  background: rgba(120,120,255,0.18);
  border-color: rgba(160,160,255,0.45);
  color: #fff;
  transform: translateY(-1px);
}

.pg98-morph-btn.is-active {
  background: rgba(100,100,255,0.3);
  border-color: rgba(160,160,255,0.7);
  color: #fff;
  box-shadow: 0 0 12px rgba(120,120,255,0.4);
}

/* ── Gyro Button ── */
.pg98-gyro-btn {
  display: none;
  align-items: center;
  gap: 7px;
  pointer-events: all;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(160,160,255,0.25);
  border-radius: 20px;
  color: rgba(200,200,255,0.85);
  font-size: 12px;
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  outline: none;
}

.pg98-gyro-btn:hover {
  background: rgba(120,120,255,0.18);
  border-color: rgba(160,160,255,0.5);
  color: #fff;
}

.pg98-gyro-btn svg {
  flex-shrink: 0;
  opacity: 0.75;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.pg98-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.32s ease;
}

.pg98-lightbox.is-open {
  opacity: 1;
}

.pg98-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 10, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

.pg98-lightbox-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transform: scale(0.95);
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 92vw;
  max-height: 88vh;
}

.pg98-lightbox.is-open .pg98-lightbox-inner {
  transform: scale(1.0);
}

.pg98-lightbox-media {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pg98-lightbox-media img {
  display: block;
  max-width: 92vw;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.07);
  object-fit: contain;
}

.pg98-lightbox-video {
  max-width: 92vw;
  max-height: 60vh;
  border-radius: 8px;
  object-fit: contain;
  opacity: 0.35;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.pg98-lightbox-caption {
  color: rgba(200,200,255,0.75);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-align: center;
  margin: 0;
  padding: 0 12px;
  max-width: 80vw;
}

/* ── Close Button ── */
.pg98-lightbox-close {
  position: absolute;
  top: -44px;
  right: -4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, transform 0.18s;
  outline: none;
  z-index: 2;
}

.pg98-lightbox-close:hover {
  background: rgba(255,255,255,0.2);
  transform: rotate(90deg) scale(1.08);
}

/* ============================================================
   ELEMENTOR EDITOR PLACEHOLDER
   ============================================================ */
.pg98-editor-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: linear-gradient(135deg, #0a0a1a 0%, #12122a 100%);
  border: 1px dashed rgba(120,120,255,0.35);
  border-radius: 8px;
  color: rgba(160,160,255,0.7);
  gap: 10px;
  padding: 32px;
}

.pg98-editor-icon {
  font-size: 48px;
  opacity: 0.6;
  line-height: 1;
}

.pg98-editor-placeholder p {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: rgba(180,180,255,0.9);
  letter-spacing: 0.04em;
}

.pg98-editor-placeholder small {
  font-size: 12px;
  opacity: 0.6;
  letter-spacing: 0.06em;
}
