/* ──────────────────────────────────────────────────────────────────────────
   Share loader — the blur + spinner shown while #pvGalleryShare prepares a
   share (builds the preview image File, then hands the payload to the OS).

   Lives in its own unbuilt stylesheet because js/pv-share-loader.js, the only
   thing that toggles it, is likewise outside the vite bundle.
   ────────────────────────────────────────────────────────────────────────── */

.pv-share-loader {
    position: fixed;
    inset: 0;
    /* Above the gallery zoom (11150), the highest layer this can appear over. */
    z-index: 11160;
    display: flex;
    align-items: center;
    justify-content: center;

    /* The blur is the whole point: a slight veil over the page behind, not a
       dark scrim. The tint keeps it readable where the photo underneath is
       light. */
    background: rgba(255, 255, 255, .28);
    backdrop-filter: blur(5px) saturate(1.05);
    -webkit-backdrop-filter: blur(5px) saturate(1.05);

    opacity: 0;
    visibility: hidden;
    /* Taps pass straight through while it fades out, so the 160ms tail never
       swallows the next tap. */
    pointer-events: none;
    transition: opacity .16s ease, visibility 0s linear .16s;
    -webkit-tap-highlight-color: transparent;
}

.pv-share-loader.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .16s ease, visibility 0s;
}

/* Browsers without backdrop-filter get a slightly heavier wash instead — the
   background has to recede somehow. */
@supports not ((backdrop-filter: blur(5px)) or (-webkit-backdrop-filter: blur(5px))) {
    .pv-share-loader {
        background: rgba(255, 255, 255, .62);
    }
}

.pv-share-loader__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 22px 26px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(15, 23, 42, .07);
    box-shadow: 0 10px 34px rgba(15, 23, 42, .16);
    transform: scale(.94);
    transition: transform .16s ease;
}

.pv-share-loader.is-visible .pv-share-loader__card {
    transform: scale(1);
}

.pv-share-loader__spinner {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(5, 150, 105, .18);
    border-top-color: #059669;
    border-radius: 50%;
    animation: pvShareSpin .7s linear infinite;
}

.pv-share-loader__text {
    margin: 0;
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: .2px;
    color: #0f172a;
}

@keyframes pvShareSpin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .pv-share-loader,
    .pv-share-loader__card {
        transition: none;
    }
    .pv-share-loader__card {
        transform: none;
    }
    .pv-share-loader__spinner {
        animation-duration: 1.6s;
    }
}
