/* CCM Sermons — shared base for the v1.7 design widgets.
   Each widget's look lives in ccm-w-featured.css / ccm-w-lists.css / ccm-w-library.css.
   Colors are CSS variables (--ccm-*) set by Style → Colors. */

.ccm-x { box-sizing: border-box; width: 100%; position: relative; -webkit-font-smoothing: antialiased; line-height: 1.5; }
.ccm-x *, .ccm-x *::before, .ccm-x *::after { box-sizing: border-box; }
.ccm-x__in { margin: 0 auto; width: 100%; }
.ccm-x h1, .ccm-x h2, .ccm-x h3, .ccm-x h4, .ccm-x p { margin: 0; padding: 0; text-transform: none; }
.ccm-x a { text-decoration: none; box-shadow: none; }
.ccm-x button { font: inherit; margin: 0; text-transform: none; letter-spacing: inherit; line-height: inherit; box-shadow: none; }
.ccm-x img { max-width: 100%; border: 0; box-shadow: none; }
.ccm-x svg { flex-shrink: 0; display: block; }
.ccm-x :focus-visible { outline: 2px solid var(--ccm-accent, currentColor); outline-offset: 3px; }

/* Use the site's Elementor Global Fonts instead of the design fonts */
.ccm-x--site-fonts, .ccm-x--site-fonts button, .ccm-x--site-fonts input, .ccm-x--site-fonts select { font-family: var(--e-global-typography-text-font-family, inherit) !important; }
.ccm-x--site-fonts h1, .ccm-x--site-fonts h2, .ccm-x--site-fonts h3, .ccm-x--site-fonts .ccm-x-display { font-family: var(--e-global-typography-primary-font-family, inherit) !important; }

/* Thumbnails: fill their frame */
.ccm-x-media { position: relative; overflow: hidden; display: block; }
.ccm-x-media > .ccm-x-img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; display: block; transition: transform .5s ease; }
.ccm-x-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: transparent; z-index: 1; }
.ccm-x-media > :not(.ccm-x-img) { z-index: 2; }
.ccm-zoom-yes .ccm-x-media:hover > .ccm-x-img, .ccm-zoom-yes a:hover .ccm-x-media > .ccm-x-img { transform: scale(1.06); }
.ccm-x-img--demo { display: block; }

/* Inline player (replaces the thumbnail after "play") */
.ccm-x-media iframe.ccm-x-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 5; }
.ccm-x-media.is-playing > :not(iframe) { visibility: hidden; }

/* Editor-only hint */
.ccm-x-empty { padding: 28px 20px; border: 2px dashed #c3c4c7; border-radius: 10px; text-align: center; color: #50575e; font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #f6f7f7; }

/* Visually hidden (labels for search fields) */
.ccm-x-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hidden by filters / pagination */
.ccm-x [hidden] { display: none !important; }

/* Horizontal scrollers (shelves, episode rows) */
.ccm-x-scroll { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.ccm-x-scroll > * { scroll-snap-align: start; }

/* Live dot */
@keyframes ccmXPulse { 0% { box-shadow: 0 0 0 0 var(--ccm-pulse, rgba(255,77,77,.6)); } 70% { box-shadow: 0 0 0 12px rgba(255,77,77,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,77,0); } }
.ccm-x-livedot { display: inline-block; border-radius: 50%; animation: ccmXPulse 1.6s infinite; }

/* ── Popup player (shared by every widget set to "Plays in a popup") ── */
.ccm-x-modal { position: fixed; inset: 0; z-index: 999999; background: var(--ccm-modal-bg, rgba(10,12,16,.86)); display: flex; align-items: center; justify-content: center; padding: 24px; animation: ccmXFade .2s ease-out; font-family: inherit; }
.ccm-x-modal__close-bg { position: absolute; inset: 0; border: 0; background: transparent; cursor: default; padding: 0; }
.ccm-x-modal__box { position: relative; width: 100%; max-width: 960px; display: flex; flex-direction: column; gap: 12px; animation: ccmXPop .25s ease-out; }
.ccm-x-modal__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #fff; }
.ccm-x-modal__title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.ccm-x-modal__x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none; }
.ccm-x-modal__x:hover { background: rgba(255,255,255,.24); }
.ccm-x-modal__video { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.ccm-x-modal__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@keyframes ccmXFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ccmXPop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
html.ccm-x-noscroll { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .ccm-x *, .ccm-x-modal, .ccm-x-modal__box { animation: none !important; transition: none !important; }
}
