/* The same media action changes from download to cancellable dots to file share. */
:is(footer, nav) > button[type="button"]:is([aria-label="Cancel file preparation"], [aria-label="Share file"]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--mediumSpacing);
    min-inline-size: 2.75rem;
    min-block-size: 2.75rem;
    padding: 0 var(--mediumSpacing);
    border: 0;
    border-radius: var(--borderRadius);
    background: none;
    box-shadow: none;
    color: var(--contrastOverlayColor);
    font: inherit;
    font-size: 1rem;
    font-style: normal;
    line-height: 1;
    text-transform: none;
    white-space: nowrap;
    cursor: pointer;
}

:is(footer, nav) > button[aria-label="Share file"] > span:first-child {
    font-size: 1.75rem;
}

/* mdi-export-variant */
button[aria-label="Share file"] > span[aria-hidden="true"]::before {
    content: "\F0B93";
    font-family: "Material Design Icons";
}

:is(footer, nav) > button[aria-label="Cancel file preparation"] > span[role="status"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    padding-block-end: .4em;
}

button[aria-label="Cancel file preparation"] > span[role="status"] > span::before {
    content: ".";
    animation: 750ms loadingDot infinite;
}

button[aria-label="Cancel file preparation"] > span[role="status"] > span:nth-child(2)::before {
    animation-delay: 250ms;
}

button[aria-label="Cancel file preparation"] > span[role="status"] > span:nth-child(3)::before {
    animation-delay: 500ms;
}

:is(footer, nav) > a[download][hidden] {
    display: none;
}

section:has(> video) > footer:has(button:is([aria-label="Cancel file preparation"], [aria-label="Share file"])),
figure section footer:has(> button[type="button"]:is([aria-label="Cancel file preparation"], [aria-label="Share file"])) {
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    button[aria-label="Cancel file preparation"] > span[role="status"] > span::before {
        animation: none;
    }
}

:is(footer, nav) > button[type="button"]:is([aria-label="Cancel file preparation"], [aria-label="Share file"])::before {
    content: none;
}
