/* FlowVella Modern Player - Dark Theme */
/* v2 - Fixed sizing to work with existing player.js */

:root {
  --player-bg: #0a0a0f;
  --player-surface: #16161e;
  --player-surface-hover: #1e1e2a;
  --player-border: #2a2a3c;
  --player-text: #f0f0f5;
  --player-text-muted: #8b8b9e;
  --player-accent: #0099FF;
  --player-accent-hover: #33adff;
  --canvas-border: rgba(255, 255, 255, 0.12);
  --canvas-radius: 16px;
  --control-height: 56px;
  --side-nav-width: 48px;
  --thumbnail-height: 100px;
  --thumbnail-width: 160px;
  --dot-size: 8px;
  --dot-gap: 6px;
}

/* Base styling - ensure dark background covers everything */
html.modern-player-html,
body.modern-player {
  background: #0a0a0f !important;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body.modern-player {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Hide footer and everything after the player wrapper (except colorbox) */
body.modern-player #wrappers_delight ~ *:not(#cboxOverlay):not(#colorbox) {
  display: none !important;
}

/* Wrapper - minimal top padding, space for bottom bar and side nav */
body.modern-player #wrappers_delight {
  background: var(--player-bg) !important;
  /* Top: 10px, Bottom: control bar + gap, Sides: side-nav + gap */
  padding: 10px calc(var(--side-nav-width) + 32px) calc(var(--control-height) + 24px) !important;
  margin: 0 !important;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Hide legacy UI elements */
body.modern-player #author,
body.modern-player #social_smaller,
body.modern-player #create,
body.modern-player .footer,
body.modern-player #footer,
body.modern-player #status_bar,
body.modern-player #overlay_arrow_bar,
body.modern-player #show_watermark,
body.modern-player #control_bar,
body.modern-player #settings_link,
body.modern-player #edit_flow_link,
body.modern-player #analytics_link,
body.modern-player #tracking_link,
body.modern-player nav,
body.modern-player .navbar,
body.modern-player #navbar,
body.modern-player .nav-wrapper,
body.modern-player .tahc-ask-btn,
body.modern-player #flowvella-chat-container,
body.modern-player #share_lightbox,
body.modern-player #auto_advance_indicator {
  display: none !important;
}

/* Override legacy share lightbox even when active */
html.share_lightbox_active body.modern-player #share_lightbox {
  display: none !important;
}

/* Player container - keep existing width/sizing, just style it */
body.modern-player #player {
  border: none !important;
  background: transparent !important;
  position: relative;
  /* Ensure player fits within available space */
  max-width: 100%;
  max-height: 100%;
}

/* Container wrapper - keep existing sizing, add visual styling */
body.modern-player #player #container_wrapper {
  overflow: hidden;
  position: relative;
  border-radius: var(--canvas-radius);
  box-shadow:
    0 0 0 3px var(--canvas-border),
    0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Container - keep transform, just add border-radius */
body.modern-player #player #container {
  border-radius: var(--canvas-radius);
  overflow: hidden;
}

/* ========== FLOATING LOGO ========== */
.modern-floating-logo {
  position: fixed;
  top: 16px;
  left: 16px;
  height: 36px;
  display: flex;
  align-items: center;
  z-index: 1000;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.modern-floating-logo:hover {
  opacity: 1;
}

.modern-floating-logo img {
  height: 36px;
  width: auto;
  border-radius: 8px;
}


.modern-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--player-surface-hover);
  border: 1px solid var(--player-border);
  border-radius: 8px;
  color: var(--player-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.modern-btn:hover {
  background: var(--player-border);
}

.modern-btn svg {
  width: 16px;
  height: 16px;
}

.modern-btn-icon {
  padding: 10px;
}

/* ========== SIDE NAVIGATION ========== */
.modern-side-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: var(--side-nav-width);
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--player-surface);
  border: 1px solid var(--player-border);
  border-radius: 12px;
  cursor: pointer;
  color: var(--player-text);
  transition: all 0.2s ease;
  z-index: 100;
  opacity: 0.9;
  text-decoration: none;
}

.modern-side-nav:hover {
  background: var(--player-surface-hover);
  opacity: 1;
  color: var(--player-text);
}

.modern-side-nav.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.modern-side-nav-prev { left: 16px; }
.modern-side-nav-next { right: 16px; }

.modern-side-nav svg {
  width: 24px;
  height: 24px;
}

/* ========== BOTTOM CONTROL BAR ========== */
.modern-control-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--control-height);
  background: var(--player-surface);
  border-top: 1px solid var(--player-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
}

.modern-control-bar-left {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  min-width: 0;
  padding-right: 100px; /* Gap from center controls */
}

.modern-control-bar-left .modern-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--player-text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modern-control-bar-right {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  padding-left: 100px; /* Gap from center controls */
}

.modern-control-group {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--player-surface-hover);
  border: 1px solid var(--player-border);
  border-radius: 12px;
  padding: 8px 16px;
}

.modern-nav-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--player-text);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.modern-nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--player-text);
}

.modern-nav-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.modern-nav-btn svg {
  width: 20px;
  height: 20px;
}

/* ========== SLIDE DOTS ========== */
.modern-dots-container {
  display: flex;
  align-items: center;
  gap: var(--dot-gap);
  padding: 0 8px;
}

.modern-slide-dot {
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 4px;
  background: var(--player-text-muted);
  opacity: 0.5;
  cursor: pointer;
  transition: all 0.25s ease;
  display: block;
}

.modern-slide-dot:hover {
  opacity: 0.8;
}

.modern-slide-dot.active {
  width: 24px;
  background: var(--player-text);
  opacity: 1;
}

.modern-dots-ellipsis {
  color: var(--player-text-muted);
  opacity: 0.5;
  font-size: 10px;
  letter-spacing: -1px;
  user-select: none;
  padding: 0 2px;
}

/* ========== SLIDE COUNTER ========== */
.modern-slide-counter {
  font-size: 13px;
  color: var(--player-text-muted);
  font-weight: 500;
  white-space: nowrap;
  padding: 0 8px;
}

.modern-slide-counter-current {
  color: var(--player-text);
}

.modern-slide-counter-separator {
  margin: 0 2px;
}

.modern-control-divider {
  width: 1px;
  height: 24px;
  background: var(--player-border);
}

/* ========== THUMBNAIL TOGGLE ========== */
.modern-thumbnail-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--player-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modern-thumbnail-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modern-thumbnail-toggle.active {
  background: var(--player-accent);
  color: white;
}

.modern-thumbnail-toggle svg {
  width: 18px;
  height: 18px;
}

/* ========== THUMBNAIL STRIP ========== */
.modern-thumbnail-strip {
  position: fixed;
  bottom: var(--control-height);
  left: 0;
  right: 0;
  height: calc(var(--thumbnail-height) + 32px);
  background: rgba(22, 22, 30, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--player-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  gap: 12px;
  overflow-x: auto;
  z-index: 900;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.modern-thumbnail-strip.hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.modern-thumbnail {
  flex-shrink: 0;
  width: var(--thumbnail-width);
  height: var(--thumbnail-height);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  position: relative;
  text-decoration: none;
}

.modern-thumbnail:hover {
  border-color: var(--player-text-muted);
}

.modern-thumbnail.active {
  border-color: var(--player-accent);
}

.modern-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modern-thumbnail-number {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ========== SHARE DRAWER ========== */
.modern-share-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1100;
}

.modern-share-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modern-share-drawer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 400px;
  max-height: 85vh;
  background: var(--player-surface);
  border: 1px solid var(--player-border);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s ease, visibility 0.3s;
  z-index: 1200;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 20px);
  visibility: hidden;
  opacity: 0;
}

@media (min-width: 768px) {
  .modern-share-drawer {
    max-width: 480px;
    border-radius: 16px;
    bottom: 80px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  }
}

.modern-share-drawer.open {
  transform: translateX(-50%) translateY(0);
  visibility: visible;
  opacity: 1;
}

.modern-share-handle {
  width: 36px;
  height: 4px;
  background: var(--player-border);
  border-radius: 2px;
  margin: 12px auto;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modern-share-handle:hover {
  background: var(--player-text-muted);
}

.modern-share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--player-border);
}

.modern-share-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--player-text);
  margin: 0;
}

.modern-share-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--player-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modern-share-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--player-text);
}

.modern-share-close svg {
  width: 20px;
  height: 20px;
}

.modern-share-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--player-border);
}

.modern-share-section:last-child {
  border-bottom: none;
}

/* Copy Link Row */
.modern-share-copy-row {
  display: flex;
  gap: 10px;
}

.modern-share-url-box {
  flex: 1;
  min-width: 0;
}

.modern-share-url-box input {
  width: 100%;
  padding: 12px 14px;
  background: var(--player-bg);
  border: 1px solid var(--player-border);
  border-radius: 10px;
  color: var(--player-text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.modern-share-url-box input:focus {
  border-color: var(--player-accent);
}

.modern-share-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--player-accent);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.modern-share-copy-btn:hover {
  background: var(--player-accent-hover);
}

.modern-share-copy-btn.copied {
  background: #22c55e;
}

.modern-share-copy-btn svg {
  width: 18px;
  height: 18px;
}

.modern-share-copy-embed {
  padding: 10px 14px;
  align-self: flex-start;
  height: 40px;
}

.modern-share-copy-embed .copy-text {
  display: none;
}

/* Social Buttons */
.modern-share-social {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.modern-share-social-btn {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--player-surface-hover);
  border: 1px solid var(--player-border);
  border-radius: 50%;
  color: var(--player-text);
  transition: all 0.2s ease;
  text-decoration: none;
}

.modern-share-social-btn:hover {
  background: var(--player-border);
  transform: translateY(-2px);
}

.modern-share-social-btn svg {
  width: 24px;
  height: 24px;
}

/* QR Code Section */
.modern-share-qr-section {
  display: flex;
  justify-content: center;
}

.modern-share-qr-container {
  text-align: center;
}

.modern-share-qr-container canvas {
  border-radius: 12px;
  background: var(--player-surface-hover);
}

.modern-share-qr-label {
  font-size: 12px;
  color: var(--player-text-muted);
  margin: 8px 0 0;
}

/* Embed Section */
.modern-share-expand-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--player-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.modern-share-expand-btn svg {
  width: 20px;
  height: 20px;
  color: var(--player-text-muted);
  transition: transform 0.2s ease;
}

.modern-share-expand-btn.expanded svg {
  transform: rotate(180deg);
}

.modern-share-embed-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.modern-share-embed-content.expanded {
  max-height: 200px;
  margin-top: 16px;
}

.modern-share-embed-sizes {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.modern-share-size-option {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--player-text-muted);
  font-size: 14px;
  cursor: pointer;
}

.modern-share-size-option input {
  accent-color: var(--player-accent);
}

.modern-share-size-option:has(input:checked) {
  color: var(--player-text);
}

.modern-share-embed-code-row {
  display: flex;
  gap: 10px;
}

.modern-share-embed-code-row textarea {
  flex: 1;
  padding: 10px 12px;
  background: var(--player-bg);
  border: 1px solid var(--player-border);
  border-radius: 10px;
  color: var(--player-text);
  font-size: 12px;
  font-family: monospace;
  resize: none;
  outline: none;
}

.modern-share-embed-code-row textarea:focus {
  border-color: var(--player-accent);
}

/* Prevent body scroll when drawer open */
body.modern-share-open {
  overflow: hidden;
}

/* ========== AUTO-ADVANCE / AUTOPLAY ========== */
.modern-autoplay-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.modern-autoplay-progress-fill {
  height: 100%;
  width: 100%;
  background: var(--player-accent);
  transform-origin: left;
}

.modern-autoplay-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--player-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modern-autoplay-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modern-autoplay-toggle.paused {
  color: var(--player-accent);
}

.modern-autoplay-toggle svg {
  width: 18px;
  height: 18px;
}

/* ========== RESPONSIVE ========== */

/* Tablet */
@media (max-width: 768px) {
  :root {
    --control-height: 48px;
    --thumbnail-height: 80px;
    --thumbnail-width: 128px;
  }

  body.modern-player #wrappers_delight {
    padding: 10px 60px calc(var(--control-height) + 16px) !important;
  }

  .modern-floating-logo { top: 12px; left: 12px; }
  .modern-floating-logo img { height: 30px; }

  .modern-control-bar-left { flex: 0 0 150px; }
  .modern-control-bar-left .modern-title { max-width: 150px; font-size: 13px; }
  .modern-control-bar-right { flex: 0 0 100px; }

  .modern-side-nav { width: 40px; height: 64px; }
  .modern-side-nav-prev { left: 8px; }
  .modern-side-nav-next { right: 8px; }

  .modern-control-bar-left { padding-right: 50px; }
  .modern-control-bar-right { padding-left: 50px; }

  .modern-control-group {
    gap: 8px;
    padding: 6px 12px;
  }

  .modern-control-bar {
    padding: 0 12px;
  }

  /* Share drawer tablet styles */
  .modern-share-social-btn {
    width: 50px;
    height: 50px;
  }
}

/* Phone */
@media (max-width: 480px) {
  :root {
    --control-height: 44px;
    --thumbnail-height: 64px;
    --thumbnail-width: 102px;
  }

  body.modern-player #wrappers_delight {
    padding: 10px 12px calc(var(--control-height) + 12px) !important;
  }

  .modern-floating-logo { top: 8px; left: 8px; }
  .modern-floating-logo img { height: 26px; border-radius: 6px; }

  .modern-control-bar-left { display: none; }
  .modern-control-bar-right { flex: 0 0 auto; padding-left: 20px; }

  .modern-side-nav { display: none; }
  .modern-btn-label { display: none; }

  .modern-control-group {
    gap: 6px;
    padding: 5px 10px;
    border-radius: 10px;
  }

  .modern-nav-btn {
    width: 32px;
    height: 32px;
  }

  .modern-nav-btn svg {
    width: 18px;
    height: 18px;
  }

  .modern-slide-counter {
    font-size: 12px;
    padding: 0 4px;
  }

  .modern-control-divider {
    height: 20px;
  }

  .modern-thumbnail-toggle,
  .modern-autoplay-toggle {
    width: 32px;
    height: 32px;
  }

  .modern-autoplay-toggle svg {
    width: 16px;
    height: 16px;
  }

  .modern-autoplay-progress {
    height: 2px;
  }

  .modern-thumbnail-strip {
    padding: 12px 16px;
    gap: 8px;
    justify-content: flex-start;
  }

  .modern-thumbnail {
    border-radius: 6px;
  }

  .modern-thumbnail-number {
    font-size: 10px;
    padding: 1px 4px;
  }

  .modern-btn {
    padding: 8px 12px;
  }

  .modern-btn-icon {
    padding: 8px;
  }

  .modern-btn svg {
    width: 14px;
    height: 14px;
  }

  /* Share drawer phone styles */
  .modern-share-drawer {
    max-width: 100%;
    max-height: 90vh;
    left: 0;
    right: 0;
    transform: translateX(0) translateY(100%);
    border-radius: 20px 20px 0 0;
    bottom: 0;
    box-shadow: none;
    border-left: none;
    border-right: none;
  }

  .modern-share-drawer.open {
    transform: translateX(0) translateY(0);
  }

  .modern-share-header {
    padding: 0 16px 12px;
  }

  .modern-share-header h2 {
    font-size: 16px;
  }

  .modern-share-section {
    padding: 12px 16px;
  }

  .modern-share-copy-row {
    flex-direction: column;
    gap: 8px;
  }

  .modern-share-copy-btn {
    width: 100%;
    padding: 14px;
  }

  .modern-share-social-btn {
    width: 48px;
    height: 48px;
  }

  .modern-share-social-btn svg {
    width: 20px;
    height: 20px;
  }

  .modern-share-qr-container canvas {
    width: 100px;
    height: 100px;
  }

  .modern-share-embed-sizes {
    flex-wrap: wrap;
    gap: 12px;
  }

  .modern-share-embed-code-row {
    flex-direction: column;
    gap: 8px;
  }

  .modern-share-copy-embed {
    width: 100%;
    padding: 12px;
  }

  .modern-share-copy-embed .copy-text {
    display: inline;
  }
}

/* Colorbox overrides for modern player */
body.modern-player #cboxOverlay,
body.modern-player #colorbox {
  z-index: 999999 !important;
}

body.modern-player #cboxOverlay {
  background: rgba(0, 0, 0, 0.95) !important;
}

body.modern-player #cboxContent {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.modern-player #cboxLoadedContent {
  background: transparent !important;
  border: none !important;
}

/* Gallery images - scale as big as possible (override colorbox.css 1024x768 limit) */
body.modern-player #cboxLoadedContent img {
  max-width: 95vw !important;
  max-height: 90vh !important;
}

body.modern-player #cboxPhoto {
  max-width: 95vw !important;
  max-height: 90vh !important;
  width: auto !important;
  height: auto !important;
}

body.modern-player #colorbox {
  max-width: 95vw !important;
  max-height: 95vh !important;
}

body.modern-player #cboxWrapper {
  max-width: 95vw !important;
  max-height: 95vh !important;
}

body.modern-player #cboxClose {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  width: 50px !important;
  height: 50px !important;
  background: rgba(255,255,255,0.2) !important;
  background-image: none !important;
  border-radius: 50% !important;
  border: 2px solid rgba(255,255,255,0.5) !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
  z-index: 99999999 !important;
}

body.modern-player #cboxClose:after {
  content: "✕" !important;
  position: absolute !important;
  text-indent: 0 !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  font-size: 24px !important;
  color: #fff !important;
}

/* PDF overlay fixes for modern player - top aligned */
body.modern-player [id^="thePDFEmbed-"] {
  position: fixed !important;
  top: 80px !important;
  left: 5% !important;
  right: 5% !important;
  bottom: 20px !important;
  width: 90% !important;
  height: auto !important;
  z-index: 999999 !important;
  background: rgba(0,0,0,0.95) !important;
}

body.modern-player [id^="pdfClose-"] {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  z-index: 99999999 !important;
  cursor: pointer;
}

/* Mobile: ensure close buttons are always on top */
@media (max-width: 768px) {
  body.modern-player #cboxClose {
    top: 10px !important;
    right: 10px !important;
    width: 44px !important;
    height: 44px !important;
    z-index: 99999999 !important;
  }

  body.modern-player #cboxClose:after {
    font-size: 20px !important;
  }

  body.modern-player [id^="pdfClose-"] {
    top: 10px !important;
    right: 10px !important;
    z-index: 99999999 !important;
  }

  body.modern-player [id^="thePDFEmbed-"] {
    top: 60px !important;
    left: 2% !important;
    right: 2% !important;
    width: 96% !important;
  }
}

/* ========== MODERN MEDIA ICONS ========== */
/* Base style - matches colorbox close button */
body.modern-player .playIcon,
body.modern-player .galleryIcon {
  width: 70px !important;
  height: 70px !important;
  background: rgba(255,255,255,0.2) !important;
  background-image: none !important;
  border-radius: 50% !important;
  border: 2px solid rgba(255,255,255,0.5) !important;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  /* Hide the PNG */
  font-size: 0;
  color: transparent;
}

body.modern-player .playIcon:hover,
body.modern-player .galleryIcon:hover {
  background: rgba(255,255,255,0.35) !important;
  border-color: rgba(255,255,255,0.7) !important;
}

/* Video play icon - triangle */
body.modern-player a[data-is-video="true"] .playIcon:after {
  content: "";
  width: 0;
  height: 0;
  border-left: 20px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 4px;
}

/* PDF icon - "PDF" text */
body.modern-player div[id^="thePDF-"] .playIcon:after {
  content: "PDF";
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0.5px;
}

/* Gallery icon - 3 stacked rectangles (matches creator SVG) */
body.modern-player .galleryIcon:after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 3px;
  box-shadow:
    5px -5px 0 #fff,
    10px -10px 0 #fff;
  /* Offset to visually center the stacked icon */
  transform: translate(3px, 3px);
}
