/* ======================================
   PAPER CURL CAROUSEL (crafto/js/metro-papercurl.js)
   The WebGL canvas sits exactly over the section's photo, inside the same clipped frame, so the slanted edges and red
   strips stay as they are. The <img> underneath stays in the page (current slide, alt text) and is the fallback.
====================================== */

.pc-fig {
    cursor: grab;
    touch-action: pan-y;            /* phones: vertical swipes still scroll the page, sideways drags turn the photo */
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.pc-fig:active {
    cursor: grabbing;
}

.pc-fig:focus-visible {
    outline: 3px solid #ee3939;
    outline-offset: -3px;
}

.pc-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
}

/* once the canvas draws, the <img> under it does not need to paint */
.pc-on > img {
    visibility: hidden;
}

/* fallback: a soft fade between photos */
.pc-fig > img {
    transition: opacity 0.22s ease;
}

.pc-fig > img.pc-fade {
    opacity: 0;
}

.pc-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---- prev / counter / next: small, on the outer side of the photo ---- */
.pc-ctrl {
    position: absolute;
    bottom: 22px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-family: "DM Sans", sans-serif;
}

.lg-ch .pc-ctrl {
    left: 24px;
}

.lg-lc .pc-ctrl {
    right: 24px;
}

.pc-btn {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.pc-btn svg {
    width: 16px;
    height: 16px;
}

.pc-btn:hover {
    background: #ee3939;
}

.pc-btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.pc-count {
    min-width: 42px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.pc-count b {
    font-weight: 700;
    color: #ffffff;
}

@media (max-width: 767px) {
    .pc-ctrl {
        bottom: 14px;
    }

    .lg-ch .pc-ctrl,
    .lg-lc .pc-ctrl {
        left: auto;
        right: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pc-fig > img,
    .pc-btn {
        transition: none;
    }
}

/* ======================================
   SECTION PEEL (crafto/js/metro-legal-peel.js): on large screens the legal sections are stacked in one pinned
   panel and the top one peels away on scroll. These rules apply only once the script has switched it on.
====================================== */
.lg-stack {
    position: relative;
}

.lg-stack.is-stacked > section.lg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

/* every sheet fills the panel, so nothing of the next one peeks out below a shorter one */
.lg-stack.is-stacked > section.lg .lg-content {
    min-height: var(--stack-h);
}

.lg-stack.is-stacked > section.lg.is-peeled {
    visibility: hidden;
}

.lg-peel-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 60;
    width: 100%;
    height: var(--stack-h);
    pointer-events: none;
}
