.creation-preview {
    position: relative;
}

.clip-preview-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    background: #0c1b24;
    border-radius: 3px;
    opacity: 0;
}

[data-preview-playing] .clip-preview-video {
    opacity: 1;
}

.clip-preview-toggle {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 6px 13px;
    border: 1px solid #b8d7d477;
    border-radius: 24px;
    background: #07141aee;
    color: #ebf6f4;
    font: inherit;
    font-size: .875rem;
    cursor: pointer;
}

.clip-preview-toggle:hover,
.clip-preview-toggle:focus-visible {
    border-color: var(--accent);
    background: #132e36;
}

.clip-preview-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.clip-preview-icon {
    width: 0;
    height: 0;
    margin-left: 2px;
    border: solid transparent;
    border-width: 5px 0 5px 8px;
    border-left-color: currentColor;
}

[data-preview-playing] .clip-preview-icon {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 1px;
    background: currentColor;
}

.clip-preview-message {
    position: absolute;
    inset: 10px 10px auto auto;
    background: #07141aee;
    color: #ebf6f4;
    padding: 6px 10px;
    border-radius: 3px;
    font-size: .85rem;
}

.gallery-preview-dialog {
    box-sizing: border-box;
    width: min(760px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
    padding: clamp(12px, 3vw, 24px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0a1b24;
    color: var(--ink);
}

.gallery-preview-dialog::backdrop {
    background: #020509cc;
}

.gallery-preview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.gallery-preview-heading h2 {
    font-size: clamp(1rem, 4vw, 1.35rem);
    line-height: 1.3;
}

.gallery-preview-heading button {
    min-height: 44px;
    padding-inline: 12px;
    background: #102930;
    color: var(--ink);
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: 4px;
    font: inherit;
}

.gallery-preview-player iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 200px;
    border: 0;
    background: #000;
}

.gallery-preview-watch {
    display: inline-block;
    margin-top: 12px;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: .25em;
}

.creation-preview [hidden] {
    display: none;
}
