/**
 * Hover-revealed download button on the headline image of single posts.
 * Applied to figure.wp-block-image and div.wp-block-cover that the
 * PHP filter has tagged with .has-headline-download.
 */

.has-headline-download {
    position: relative;
}

.verdane-headline-download {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 14px;
    background-color: rgba(13, 30, 36, 0.65);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 200ms ease, transform 200ms ease, background-color 150ms ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    -webkit-appearance: none;
    appearance: none;
    line-height: 0;
}

.verdane-headline-download:hover,
.verdane-headline-download:focus-visible {
    background-color: rgba(13, 30, 36, 0.9);
}

.verdane-headline-download:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.verdane-headline-download svg {
    width: 20px;
    height: 20px;
    display: block;
}

.verdane-headline-download.is-busy {
    cursor: progress;
    opacity: 0.85;
}

/* Reveal on hover/focus of the headline container */
.has-headline-download:hover .verdane-headline-download,
.has-headline-download:focus-within .verdane-headline-download,
.verdane-headline-download:focus-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Touch / coarse-pointer devices: always show — no hover available */
@media (hover: none) {
    .verdane-headline-download {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .verdane-headline-download {
        transition: opacity 0ms, background-color 0ms;
        transform: none;
    }
}
