/**
 * CM YT Player Videos - the looks. Every colour and space is a --cm-ytp-* variable (defaults from config.php; the panels print the elements'
 * own values inline over them), sizes are the cm-fse classes. Two-selector rule. The section spans the page; the inner wrapper carries the
 * width classes and is the container (cm-cqi-container) the tiers query; the section pads more from 808px. The ROW is cm-alpha's ui-carousel
 * (1.3.0, plan 05.1-06): the viewport, the track, the card sizing per tier (one, two from 523px, the panel's --cm-carousel-across from 950px),
 * the end cards' centring, the focus-ring room and the carousel links' visibility live in cm-carousel.css; this file hands the library its
 * gap and ring from the block's own variables and styles only what is inside a card (the link, frame, picture, badge, words) and the Pause
 * button's look.
 */
.editor-styles-wrapper .wp-block-cm-yt-player-videos,
.wp-block-cm-yt-player-videos {
    box-sizing: border-box;
    display: block;
    clear: both;
    position: relative;
    background: var(--cm-ytp-bg);
    color: var(--cm-ytp-text);
    --cm-carousel-gap: var(--cm-ytp-gap);   /* the library's row reads these two from the wrapper; never set at :root */
    --cm-carousel-ring: var(--cm-ytp-ring);
}
.editor-styles-wrapper .wp-block-cm-yt-player-videos *,
.wp-block-cm-yt-player-videos * { box-sizing: border-box; }

.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__inner,
.wp-block-cm-yt-player-videos .cm-ytp__inner { padding: var(--cm-ytp-section-pad) 0; }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__inner,
.wp-block-cm-yt-player-videos .cm-ytp__inner,
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__inner p,
.wp-block-cm-yt-player-videos .cm-ytp__inner p { letter-spacing: normal; } /* the z width classes set a tracking on the wrapper AND on every p inside it */

/* The heading row: the words left, the all-videos link right on their shared baseline; the link drops under the words when the row is narrow */
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__head,
.wp-block-cm-yt-player-videos .cm-ytp__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--cm-ytp-head-row-gap) var(--cm-ytp-gap); margin-bottom: var(--cm-ytp-head-gap); }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__words > *,
.wp-block-cm-yt-player-videos .cm-ytp__words > * { margin: 0; }
.editor-styles-wrapper .wp-block-cm-yt-player-videos p.cm-ytp__kicker,
.wp-block-cm-yt-player-videos p.cm-ytp__kicker { letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--cm-ytp-accent); } /* p: outranks the tracking reset above */
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__title,
.wp-block-cm-yt-player-videos .cm-ytp__title { margin-top: 0.2em; color: var(--cm-ytp-text); font-weight: 600; line-height: 1.2; text-wrap: balance; }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__lead,
.wp-block-cm-yt-player-videos .cm-ytp__lead { margin-top: 0.6em; max-width: 40em; line-height: 1.5; }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__more,
.wp-block-cm-yt-player-videos .cm-ytp__more { font-weight: 600; color: var(--cm-ytp-accent); text-decoration: none; border-bottom: var(--cm-ytp-more-rule-width) solid var(--cm-ytp-more-rule); padding-bottom: var(--cm-ytp-more-rule-width); }

.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__link,
.wp-block-cm-yt-player-videos .cm-ytp__link { display: flex; flex-direction: column; gap: var(--cm-ytp-card-gap); color: var(--cm-ytp-text); text-decoration: none; }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__link:hover .cm-ytp__card-title,
.wp-block-cm-yt-player-videos .cm-ytp__link:hover .cm-ytp__card-title { text-decoration: underline; }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__link:focus-visible,
.wp-block-cm-yt-player-videos .cm-ytp__link:focus-visible { outline: 2px solid var(--cm-ytp-accent); outline-offset: 3px; border-radius: var(--cm-ytp-radius); }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__frame,
.wp-block-cm-yt-player-videos .cm-ytp__frame {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--cm-ytp-border);
    border-radius: var(--cm-ytp-radius);
    overflow: hidden;
    background: var(--cm-ytp-frame-bg);
}
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__thumb,
.wp-block-cm-yt-player-videos .cm-ytp__thumb { display: block; width: 100%; height: 100%; object-fit: cover; } /* the 480x360 picture's bars are exactly what the 16:9 frame crops */
/* The play badge: its colour is the badge element's (inline from the panel, else --cm-ytp-badge through currentColor) */
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__play,
.wp-block-cm-yt-player-videos .cm-ytp__play { position: absolute; inset: 0; margin: auto; width: var(--cm-ytp-badge-w); height: var(--cm-ytp-badge-h); color: var(--cm-ytp-badge); background: currentColor; border-radius: var(--cm-ytp-badge-radius); }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__play::after,
.wp-block-cm-yt-player-videos .cm-ytp__play::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-40%, -50%); border-style: solid; border-width: calc(var(--cm-ytp-badge-h) * 0.22) 0 calc(var(--cm-ytp-badge-h) * 0.22) calc(var(--cm-ytp-badge-h) * 0.38); border-color: transparent transparent transparent var(--cm-ytp-badge-text); }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__card-title,
.wp-block-cm-yt-player-videos .cm-ytp__card-title { font-weight: 600; line-height: 1.35; }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__number,
.wp-block-cm-yt-player-videos .cm-ytp__number,
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__date,
.wp-block-cm-yt-player-videos .cm-ytp__date { line-height: 1.4; }

/* The visible notice when the list cannot be read (never stale cards) */
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__notice,
.wp-block-cm-yt-player-videos .cm-ytp__notice { margin: 0; color: var(--cm-ytp-notice); }

/* The look of the three carousel links (Previous, "Pause carousel" / "Play carousel", Next: all wear this class), small under the row; the
   library's wrapper centres them and its rule alone shows and hides them; the space above stays on each link (its em is the link's own size) */
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__pause,
.wp-block-cm-yt-player-videos .cm-ytp__pause { margin: 0.6em 0 0; padding: 0; border: 0; background: none; color: var(--cm-ytp-accent); font-family: inherit; text-decoration: underline; cursor: pointer; }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__pause:focus-visible,
.wp-block-cm-yt-player-videos .cm-ytp__pause:focus-visible { outline: 3px solid var(--cm-ytp-accent); outline-offset: 1px; }

/* The canvas stand-ins: no playlist yet, no title (the page prints neither) */
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__placeholder,
.wp-block-cm-yt-player-videos .cm-ytp__placeholder { opacity: 0.7; }
.editor-styles-wrapper .wp-block-cm-yt-player-videos p.cm-ytp__placeholder,
.wp-block-cm-yt-player-videos p.cm-ytp__placeholder { border: 1px dashed var(--cm-ytp-border); border-radius: var(--cm-ytp-radius); padding: 1em; margin: 0; text-align: center; }

/* The Featured layout (1.6.0): the first video large, the others as rows of picture and words in a list. One column (the large video, then
   the rows) until the block's own inner wrapper is 808px wide, two columns from there. Every video is in view; nothing moves. */
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__featured,
.wp-block-cm-yt-player-videos .cm-ytp__featured { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--cm-ytp-featured-gap); align-items: start; }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__card-text,
.wp-block-cm-yt-player-videos .cm-ytp__card-text { display: flex; flex-direction: column; gap: var(--cm-ytp-card-gap); min-width: 0; }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__featured-big .cm-ytp__big-text,
.wp-block-cm-yt-player-videos .cm-ytp__featured-big .cm-ytp__big-text { font-size: calc(1em * var(--cm-ytp-big-title-scale-narrow)); line-height: 1.3; }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__featured-big .cm-ytp__play,
.wp-block-cm-yt-player-videos .cm-ytp__featured-big .cm-ytp__play { font-size: calc(1em * var(--cm-ytp-big-badge-scale)); }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__featured-side,
.wp-block-cm-yt-player-videos .cm-ytp__featured-side { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__featured-row,
.wp-block-cm-yt-player-videos .cm-ytp__featured-row { margin: 0; padding: var(--cm-ytp-side-pad) 0; border-top: 1px solid var(--cm-ytp-side-rule); }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__featured-row:first-child,
.wp-block-cm-yt-player-videos .cm-ytp__featured-row:first-child { border-top: 0; padding-top: 0; }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__featured-row .cm-ytp__link,
.wp-block-cm-yt-player-videos .cm-ytp__featured-row .cm-ytp__link { flex-direction: row; align-items: center; gap: var(--cm-ytp-side-gap); }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__featured-row .cm-ytp__frame,
.wp-block-cm-yt-player-videos .cm-ytp__featured-row .cm-ytp__frame { flex: none; width: var(--cm-ytp-side-thumb); }
.editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__featured-row .cm-ytp__play,
.wp-block-cm-yt-player-videos .cm-ytp__featured-row .cm-ytp__play { font-size: calc(1em * var(--cm-ytp-side-badge-scale)); }

@container (min-width: 808px) {
    .editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__inner,
    .wp-block-cm-yt-player-videos .cm-ytp__inner { padding: var(--cm-ytp-section-pad-wide) 0; }
    .editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__featured,
    .wp-block-cm-yt-player-videos .cm-ytp__featured { grid-template-columns: var(--cm-ytp-featured-columns); } /* measured on .cm-ytp__inner, the block's own container */
    .editor-styles-wrapper .wp-block-cm-yt-player-videos .cm-ytp__featured-big .cm-ytp__big-text,
    .wp-block-cm-yt-player-videos .cm-ytp__featured-big .cm-ytp__big-text { font-size: calc(1em * var(--cm-ytp-big-title-scale)); }
}
