/* Maps live /cartoons/ DOM + ce-* hooks onto cartoons-reels mockup visuals */

/* Immersive shell (was in cartoons-short.css — keep without legacy column UI) */
html:has(body.page-cartoons-explode) {
  height: 100%;
  overflow: hidden;
  overflow-x: clip;
}

body.page-cartoons-explode {
  --reels-height: 100vh;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  overflow-x: clip;
  width: 100%;
  background: #000 !important;
}

@supports (height: 100svh) {
  body.page-cartoons-explode {
    --reels-height: 100svh;
    height: 100svh;
    max-height: 100svh;
  }
}

@supports (height: 100dvh) {
  body.page-cartoons-explode {
    --reels-height: 100dvh;
    height: 100dvh;
    max-height: 100dvh;
  }
}

body.page-cartoons-explode .site-header,
body.page-cartoons-explode .mobile-drawer-overlay,
body.page-cartoons-explode .mobile-navigation,
body.page-cartoons-explode .site-footer,
body.page-cartoons-explode .back-to-top,
body.page-cartoons-explode #accessibility-toggle {
  display: none !important;
}

body.page-cartoons-explode .site-page-fill,
body.page-cartoons-explode #site-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100%;
  background: #000;
}

body.page-cartoons-explode #cartoons-explode-root.reel-app {
  position: relative;
  width: 100%;
  height: var(--reels-height, 100dvh);
  min-height: var(--reels-height, 100dvh);
  max-height: var(--reels-height, 100dvh);
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: #000;
}

#cartoons-explode-root .ce-is-hidden,
#cartoons-explode-root .ce-state-panel.ce-is-hidden,
#cartoons-explode-root [hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#cartoons-explode-root .ce-state-panel {
  display: none;
}

#cartoons-explode-root .ce-state-panel:not(.ce-is-hidden):not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  text-align: center;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #0a0e14;
  color: rgba(255, 255, 255, 0.9);
}

body.page-cartoons-explode #cartoons-explode-root .reel-frame {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.page-cartoons-explode #cartoons-explode-root .reel-feed,
body.page-cartoons-explode #cartoons-explode-root .reels-feed {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

body.page-cartoons-explode #cartoons-explode-root .reel-slide.reel {
  height: 100%;
  min-height: 100%;
}

body.page-cartoons-explode #cartoons-explode-root .reel-bg .video-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

body.page-cartoons-explode #cartoons-explode-root .reel-bg .ce-reel-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

body.page-cartoons-explode #cartoons-explode-root .reel-bg .ce-reel-grad {
  display: none;
}

body.page-cartoons-explode #cartoons-explode-root .ce-center-play-wrap.center-toggle {
  pointer-events: none;
  z-index: 6;
}

body.page-cartoons-explode #cartoons-explode-root .ce-center-play-wrap .ce-center-play-btn {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  color: #fff;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-cartoons-explode #cartoons-explode-root .ce-center-play-wrap .ce-center-play-btn svg {
  width: 28px;
  height: 28px;
}

body.page-cartoons-explode #cartoons-explode-root .reel.paused .ce-center-play-wrap.center-toggle,
body.page-cartoons-explode #cartoons-explode-root .reel-slide.paused .ce-center-play-wrap.center-toggle {
  opacity: 1;
}

body.page-cartoons-explode #cartoons-explode-root .reel-actions.action-sidebar {
  position: absolute;
  z-index: 10;
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  inset-inline-end: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: auto;
  max-height: none;
  overflow: visible;
  padding: 0;
  background: transparent;
}

body.page-cartoons-explode #cartoons-explode-root .reel-actions .ce-action-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
}

body.page-cartoons-explode #cartoons-explode-root .reel-actions .action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  min-width: 0;
  border: none;
  background: transparent;
  color: #fff;
}

body.page-cartoons-explode #cartoons-explode-root .reel-actions .action-btn .action-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

body.page-cartoons-explode #cartoons-explode-root .reel-actions .action-btn .action-circle svg {
  width: 22px;
  height: 22px;
}

body.page-cartoons-explode #cartoons-explode-root .reel-actions .ce-liked .action-circle,
body.page-cartoons-explode #cartoons-explode-root .reel-actions .action-btn.liked .action-circle,
body.page-cartoons-explode #cartoons-explode-root .reel-actions .action-btn.ce-liked .action-circle {
  background: var(--berry, #e4536b);
}

body.page-cartoons-explode #cartoons-explode-root .reel-actions .ce-saved .action-circle,
body.page-cartoons-explode #cartoons-explode-root .reel-actions .action-btn.ce-saved .action-circle {
  background: var(--sun, #ff9f1c);
}

body.page-cartoons-explode #cartoons-explode-root .reel-actions .ce-action-count,
body.page-cartoons-explode #cartoons-explode-root .reel-actions .ce-action-label,
body.page-cartoons-explode #cartoons-explode-root .reel-actions .action-count {
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

body.page-cartoons-explode #cartoons-explode-root .reel-caption {
  z-index: 8;
}

body.page-cartoons-explode #cartoons-explode-root .reel-caption .level-chip {
  background: var(--sun);
  color: #fff;
}

body.page-cartoons-explode #cartoons-explode-root .reel-caption .ce-access-badge--premium {
  background: var(--grape);
}

body.page-cartoons-explode #cartoons-explode-root .reel-caption .ce-access-badge--free {
  background: var(--leaf);
}

body.page-cartoons-explode #cartoons-explode-root .reel-caption .ce-reel-title {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

body.page-cartoons-explode #cartoons-explode-root .reel-caption .ce-reel-cat {
  display: inline-block;
  margin-inline-end: 6px;
  opacity: 0.9;
  font-size: 12px;
  font-weight: 700;
}

body.page-cartoons-explode #cartoons-explode-root .reel-topbar-cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 14px 10px;
  scrollbar-width: none;
  z-index: 20;
  position: relative;
}

body.page-cartoons-explode #cartoons-explode-root .reel-topbar-cats::-webkit-scrollbar {
  display: none;
}

body.page-cartoons-explode #cartoons-explode-root .reel-topbar-cats .category-pill {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
}

body.page-cartoons-explode #cartoons-explode-root .reel-topbar-cats .category-pill.active {
  background: var(--sun, #ff9f1c);
  border-color: transparent;
  color: #fff;
}

body.page-cartoons-explode #cartoons-explode-root .ce-timed-quiz-overlay.quiz-overlay {
  align-items: flex-end;
}

body.page-cartoons-explode #cartoons-explode-root .ce-timed-quiz-overlay.quiz-overlay:not(.ce-timed-quiz-overlay--hidden) {
  opacity: 1;
  pointer-events: auto;
}

body.page-cartoons-explode #cartoons-explode-root .progress-wrapper.ce-seekable {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 12;
}

body.page-cartoons-explode #cartoons-explode-root .progress-bar-bg {
  height: 4px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}

body.page-cartoons-explode #cartoons-explode-root .progress-fill,
body.page-cartoons-explode #cartoons-explode-root .ce-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--sun), var(--berry));
  transition: width 0.15s linear;
}

body.page-cartoons-explode #cartoons-explode-root .progress-fill.ce-no-transition {
  transition: none;
}

body.page-cartoons-explode #cartoons-explode-root .reel-bg .blob {
  z-index: 0;
}

body.page-cartoons-explode #cartoons-explode-root .reel-bg .ce-reel-video {
  background: transparent;
}

body.page-cartoons-explode #cartoons-explode-root .reel.paused .ce-reel-video:not([src]),
body.page-cartoons-explode #cartoons-explode-root .reel.paused .ce-reel-video[src=""] {
  opacity: 0;
}

body.page-cartoons-explode #cartoons-explode-root .reel-menu-drawer[hidden] {
  display: none !important;
}
