/* Shared editor + frontend rules. New classes deliberately avoid legacy video-card CSS. */
.ag-video-piece { box-sizing:border-box; background:#faf7ee; border:1px solid #c8b68e; border-top:3px solid #aa8a4f; color:#24352d; overflow:hidden; min-width:0; width:100%; margin:0; display:flex; flex-direction:column; }
.ag-video-piece .ag-video-caption { padding:24px 26px; flex:1; box-sizing:border-box; }
.ag-video-piece .ag-video-caption h3 { font-family:Georgia,serif; font-weight:400; font-size:clamp(21px,2vw,27px); line-height:1.28; color:inherit; margin:0 0 16px; overflow-wrap:anywhere; }
.ag-video-piece .ag-video-watch { font-family:inherit; color:inherit; font-size:14px; text-decoration:underline; text-underline-offset:4px; line-height:1.5; }
.ag-video-piece .ag-video-player { position:relative; width:100%; aspect-ratio:16 / 9; background:#142a22; margin:0; flex:none; }
.ag-video-piece .ag-video-player iframe { position:absolute; inset:0; display:block; width:100%; height:100%; border:0; }
.ag-video-piece .ag-video-setup { padding:24px; background:#fff; color:#24352d; }
.ag-video-piece .ag-video-description { margin:0; font-size:17px; line-height:1.6; color:inherit; white-space:pre-wrap; }
.ag-video-piece .ag-video-caption h3:last-child { margin-bottom:0; }
.ag-video-piece.is-style-slate { background:#354551; color:#fbf8ef; border:1px solid #354551; border-top:3px solid #a9b8c2; padding:24px; }
.ag-video-piece.is-style-slate .ag-video-caption { padding:4px 4px 24px; }
.ag-video-piece.is-style-minimal { background:transparent; border:0; border-top:1px solid #aa8a4f; }
.ag-video-piece.is-style-minimal .ag-video-caption { padding:24px 0; }
.ag-video-piece a:focus-visible { outline:3px solid #aa8a4f; outline-offset:5px; }
.ag-video-piece.is-style-editorial { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.75fr); align-items:center; background:#e5e9e1; border-top:1px solid #c8b68e; }
.ag-video-piece.is-style-editorial .ag-video-caption { padding:32px; }
.ag-video-piece.is-style-cinema { background:#203e32; color:#f8f3e5; border-color:#203e32; border-top-color:#aa8a4f; padding:24px; }
.ag-video-piece.is-style-cinema .ag-video-caption { padding:4px 4px 24px; }
.ag-video-piece.is-style-cinema .ag-video-caption h3 { max-width:800px; }
.ag-video-gallery { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:28px !important; align-items:stretch; }
.ag-video-gallery > .ag-video-piece { width:100% !important; max-width:none !important; margin:0 !important; }
.ag-video-gallery > .ag-video-piece:is(.is-style-editorial,.is-style-cinema,.is-style-slate) { grid-column:1 / -1; }
/* Non-iframed editors may insert an extra block-list wrapper. */
.ag-video-gallery > .block-editor-inner-blocks { grid-column:1 / -1; }
.ag-video-gallery > .block-editor-inner-blocks > .block-editor-block-list__layout { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; }
.ag-collection-links { display:flex; flex-wrap:wrap; gap:12px; margin-block:0 24px; }
.ag-collection-links .wp-block-button { flex:0 0 auto; }
.ag-collection-links .wp-block-button__link { display:block; box-sizing:border-box; width:auto; padding:12px 24px; border:1px solid #203e32; border-radius:2px; background:#203e32; color:#fff; text-align:center; font-family:inherit; font-size:16px; text-decoration:none; }
.ag-collection-links .ag-collection-new .wp-block-button__link { background:#987333; border-color:#987333; color:#fff; }
@media(max-width:700px) {
 .ag-video-gallery, .ag-video-gallery > .block-editor-inner-blocks > .block-editor-block-list__layout { grid-template-columns:minmax(0,1fr) !important; gap:24px !important; }
 .ag-video-piece.is-style-editorial { grid-template-columns:minmax(0,1fr); }
 .ag-video-piece .ag-video-caption, .ag-video-piece.is-style-editorial .ag-video-caption { padding:20px; }
 .ag-video-piece .ag-video-caption h3 { font-size:23px; }
 .ag-video-piece.is-style-cinema { padding:12px; }
 .ag-video-piece.is-style-slate { padding:12px; }
 .ag-video-piece.is-style-slate .ag-video-caption { padding:8px 8px 20px; }
 .ag-video-piece.is-style-cinema .ag-video-caption { padding:8px 8px 20px; }
}
