/* Reserve a separate top row so the close control never overlaps a share option. */
.share-modal .share-dialog {
    padding-top: 56px;
}
.share-modal .share-dialog .share-close {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    margin: 0;
    padding: 0;
    line-height: 1;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-pill);
    color: var(--color-main);
}
.share-modal .share-close .icon {
    display: block;
    margin: 0;
}

/* The Save sheet keeps its existing mobile-only close button and dimensions.
   Draw the cross symmetrically so its alignment is independent of font metrics. */
.video-actions .wegot-save-panel .wegot-save-panel-head {
    align-items: center;
}
.video-actions .wegot-save-panel .wegot-save-close {
    position: relative;
    box-sizing: border-box;
    flex: 0 0 28px;
    align-self: center;
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    margin: 0;
    padding: 0;
    font-size: 0;
    line-height: 1;
    color: var(--color-main);
    background: var(--bg-page);
    border-color: var(--color-border);
}
.video-actions .wegot-save-panel .wegot-save-close::before,
.video-actions .wegot-save-panel .wegot-save-close::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    transform: translate(-50%, -50%) rotate(45deg);
    pointer-events: none;
}
.video-actions .wegot-save-panel .wegot-save-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
.share-modal .share-close:focus-visible,
.video-actions .wegot-save-panel .wegot-save-close:focus-visible {
    outline: 2px solid var(--color-active);
    outline-offset: 2px;
}
