.website-media-viewer {
    width: min(1240px, calc(100vw - 32px));
    height: min(940px, calc(100dvh - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    border: 1px solid #64748b;
    border-radius: 14px;
    padding: 0;
    background: #111827;
    color: #fff;
    box-shadow: 0 24px 90px #0008;
    overflow: hidden;
}
.website-media-viewer[open] { display: flex; flex-direction: column; }
.website-media-viewer[hidden] { display: none !important; }
.website-media-viewer::backdrop { background: #020617df; }
.website-media-viewer__heading { display: flex; justify-content: flex-end; flex: 0 0 auto; padding: 8px; }
.website-media-viewer button,
.website-media-viewer__original {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    padding: 8px 14px;
    margin: 0;
    font: 650 16px/1.3 system-ui, sans-serif;
    background: #1e293b;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}
.website-media-viewer button:disabled { color: #94a3b8; border-color: #475569; cursor: default; }
.website-media-viewer button:focus-visible,
.website-media-viewer a:focus-visible,
.website-media-viewer iframe:focus-visible { outline: 3px solid #fbbf24; outline-offset: 3px; }
.website-media-viewer__close { font-size: 27px !important; line-height: 1 !important; padding: 4px 10px !important; }
.website-media-viewer__stage {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    padding: 0 12px;
    overflow: auto;
}
.website-media-viewer__stage img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.website-media-viewer__stage iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.website-media-viewer__footer { flex: 0 0 auto; padding: 12px 16px 16px; }
.website-media-viewer__caption { margin: 0 0 10px; font: 400 16px/1.5 system-ui, sans-serif; overflow-wrap: anywhere; }
.website-media-viewer__controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.website-media-viewer__count { margin: 0 auto 0 0; font: 400 14px/1.4 system-ui, sans-serif; }
.website-media-viewer__error { margin: 0 16px; font: 400 16px/1.5 system-ui, sans-serif; }
.website-media-viewer [hidden] { display: none !important; }
.website-media-viewer__title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
a[data-website-media] { cursor: zoom-in; }
@media (max-width: 640px) {
    .website-media-viewer { width: calc(100vw - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); border-radius: 10px; }
    .website-media-viewer__stage { padding: 0 6px; }
    .website-media-viewer__footer { padding: 10px; }
    .website-media-viewer__original { font-size: 14px; padding: 8px 10px; }
}
