.sw-video {
    box-sizing: border-box;
    display: flex;
    width: 100vw;
    max-width: 100vw;
    margin: 24px 0 24px calc(50% - 50vw);
}

.sw-video *,
.sw-video *::before,
.sw-video *::after {
    box-sizing: inherit;
}

.sw-video--align-left {
    justify-content: flex-start;
}

.sw-video--align-center {
    justify-content: center;
}

.sw-video--align-right {
    justify-content: flex-end;
}

.sw-video__frame {
    position: relative;
    max-width: 100vw;
    overflow: hidden;
    background: #111;
    border-radius: 8px;
}

.sw-video--horizontal .sw-video__frame {
    width: min(var(--sw-video-width, 100vw), 100vw);
    aspect-ratio: 16 / 9;
}

.sw-video--vertical .sw-video__frame {
    width: var(--sw-video-width, min(420px, 100%));
    aspect-ratio: 9 / 16;
}

.sw-video iframe,
.sw-video video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.sw-video video {
    object-fit: cover;
}

.sw-video__sound {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 14px;
    color: #111;
    font: 600 14px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: rgba(255, 255, 255, 0.92);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

.sw-video__sound:hover,
.sw-video__sound:focus-visible {
    background: #fff;
    transform: translateY(-1px);
}

.sw-video__sound--active {
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
}

.sw-video__sound-icon {
    position: relative;
    width: 16px;
    height: 16px;
    border-left: 7px solid currentColor;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.sw-video__sound-icon::before,
.sw-video__sound-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 3px;
    border: 2px solid currentColor;
    border-left: 0;
    border-top-color: transparent;
    border-bottom-color: transparent;
    border-radius: 50%;
    transform: translateY(-50%);
}

.sw-video__sound-icon::before {
    width: 9px;
    height: 11px;
}

.sw-video__sound-icon::after {
    width: 14px;
    height: 16px;
}

@supports not (aspect-ratio: 16 / 9) {
    .sw-video__frame::before {
        content: "";
        display: block;
    }

    .sw-video--horizontal .sw-video__frame::before {
        padding-top: 56.25%;
    }

    .sw-video--vertical .sw-video__frame::before {
        padding-top: 177.7778%;
    }
}
