.wz-media-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.82);
}

.wz-media-viewer-panel {
  width: min(1000px, 96vw);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.wz-media-viewer-topbar {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.wz-media-viewer-counter {
  min-width: 72px;
  font-size: 14px;
  font-weight: 600;
}

.wz-media-viewer-image-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.wz-media-viewer-image-controls button,
.wz-media-viewer-close,
.wz-media-viewer-navigation button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 7px 12px;
  background: #f1f1f1;
  color: #222;
  font: inherit;
  cursor: pointer;
}

.wz-media-viewer-image-controls button:hover,
.wz-media-viewer-close:hover,
.wz-media-viewer-navigation button:hover:not(:disabled) {
  background: #e5e5e5;
}

.wz-media-viewer-close {
  margin-left: 6px;
  font-size: 22px;
  line-height: 1;
}

.wz-media-viewer-stage {
  min-height: 280px;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 16px;
  background: #111;
}

.wz-media-viewer-image {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 120ms ease;
}

.wz-media-viewer-video-wrap {
  position: relative;
  width: min(100%, 900px);
  aspect-ratio: 16 / 9;
  background: #000;
}

.wz-media-viewer-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.wz-media-viewer-navigation {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.wz-media-viewer-navigation button {
  min-width: 120px;
}

.wz-media-viewer-navigation button:disabled {
  opacity: 0.4;
  cursor: default;
}

@media (max-width: 600px) {
  .wz-media-viewer {
    padding: 8px;
  }

  .wz-media-viewer-panel {
    width: 100%;
    max-height: 97vh;
  }

  .wz-media-viewer-topbar {
    flex-wrap: wrap;
  }

  .wz-media-viewer-image-controls {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .wz-media-viewer-stage {
    min-height: 220px;
    padding: 8px;
  }

  .wz-media-viewer-navigation {
    padding: 10px;
  }

  .wz-media-viewer-navigation button {
    min-width: 0;
    flex: 1;
  }
}

/* WayzAway media viewer refinements */
.wz-media-viewer-image-controls[hidden] {
  display: none !important;
}

.wz-media-viewer-close {
  margin-left: auto;
  align-self: flex-start;
}

/* WayzAway event-card media preview */
.wz-media-viewer-image {
  cursor: default;
}

.wz-card-video-preview {
  position: relative;
  display: block;
  width: calc(100% - 32px);
  aspect-ratio: 16 / 9;
  margin: 12px 16px 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #000;
  cursor: pointer;
}

.wz-card-video-preview-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wz-card-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #e40046;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  padding-left: 4px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.wz-card-video-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}

@media (max-width: 600px) {
  .wz-card-video-play {
    width: 58px;
    height: 58px;
    font-size: 26px;
  }
}
