/* One video treatment for published articles, previews and the publication desk. */
figure.smag-video-embed { margin: 2rem 0; max-width: 100%; min-width: 0; }
.smag-video-player { overflow: hidden; border: 1px solid var(--smag-line, #d8dfd9); border-radius: 12px; }
.smag-video-player .smag-video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; background: #102631; }
.smag-video-player .smag-video-frame iframe { display: block; position: absolute; inset: 0; border: 0; margin: 0; width: 100%; height: 100%; max-width: none; }
figure.smag-video-player > .smag-video-caption { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 14px; margin: 0; padding: 16px 20px; color: inherit; font: 500 13px/1.65 Manrope, Arial, sans-serif; }
.smag-video-caption .smag-video-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; }
.smag-video-caption .smag-video-title { flex: 1 1 180px; overflow-wrap: anywhere; }
.smag-video-caption a.smag-video-watch { margin-left: auto; font-size: 11px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; color: inherit; }
/* The stored editor card is safe HTML, compatible with the existing save plugins. */
#smag-writing figure.smag-video-embed { position: relative; display: block; padding: 24px; border: 1px solid #b5cedb; border-radius: 12px; background: #eaf1f4; color: #16313e; cursor: pointer; user-select: none; }
#smag-writing figure.smag-video-embed:hover { background: #dfecf2; border-color: #789eae; }
#smag-writing figure.smag-video-embed > .smag-video-source { display: block; font-size: 13px; font-weight: 800; letter-spacing: .02em; text-decoration: none; }
#smag-writing figure.smag-video-embed > figcaption { margin: 8px 0 0; font-size: 17px; line-height: 1.5; font-weight: 600; }
#smag-writing figure.smag-video-embed::after { content: 'Vídeo integrado · Pulsa para editar o quitar'; display: block; margin-top: 14px; font-size: 11px; font-weight: 500; color: #486773; }
.smag-writing-toolbar > button[data-command=youtube] { background: #eaf1f4; font-weight: 800; }
.smag-video-dialog { width: 520px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.smag-video-dialog label:not(:first-child) { margin-top: 18px; }
.smag-video-dialog .smag-dialog-actions { flex-wrap: wrap; }
.smag-video-dialog #smag-remove-video { margin-right: auto; color: #963d31; }
@media (max-width: 520px) {
    figure.smag-video-embed { margin: 1.5rem 0; }
    figure.smag-video-player > .smag-video-caption { padding: 12px 14px; gap: 6px 12px; }
    #smag-writing figure.smag-video-embed { padding: 20px; }
    .smag-video-dialog { padding: 22px; }
    .smag-video-dialog .smag-dialog-actions > button { flex: 1 1 auto; }
}
