/*
 * "Seite in Arbeit" template (CMS block page-in-progress, In Admin) for pages whose content isn't ready yet: a light
 * full-width section under the breadcrumbs with a wireframe landscape (images/sr-wip-landscape.webp, supplied by the
 * owner: white at the top like the breadcrumbs, #f5f5f5 at the bottom like the footer, so it shows no edges), the heading with the page's name, a progress bar and a pill back to the
 * homepage. Content in the left half on Desktop, full width on Mobile and Tablet portrait. Site container: content at
 * most 1372px wide, at least 48px from the edge (16px on Mobile). Docs: docs/page-in-progress.html
 */
.sr-wip {
    --sr-wip-ink: #1f2328;
    --sr-wip-muted: #6e6e73;
    --sr-wip-line: #e5e5e5;
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    /* One screen minus the navbar: the header is 81px on Desktop (the floating pill below 1024px: see below) */
    min-height: calc(100vh - 81px);
    padding: 96px max(48px, calc((100% - 1372px) / 2));
    overflow: hidden;
    background-color: #ffffff;
    /* Fade the mesh behind the text on the left; the hills stay clear on the right */
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.5) 45%, rgba(255, 255, 255, 0) 70%),
        url('../images/sr-wip-landscape.webp');
    background-position: center, center bottom;
    background-repeat: no-repeat;
    background-size: cover, cover;
    color: var(--sr-wip-ink);
}

/* Flush with the footer: Magento's main column keeps 40px padding under the content (Luma: .columns .column.main, matched one class deeper) */
.columns .column.main:has(.sr-wip) {
    padding-bottom: 0;
}

.sr-wip__body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 50%;
    max-width: 640px;
    min-width: 0;
}

.sr-wip .sr-wip__title {
    margin: 0;
    color: var(--sr-wip-ink);
    font-family: 'Barlow', sans-serif;
    font-size: clamp(4rem, 4.4vw, 6.4rem);
    font-weight: 600;
    line-height: 1.05;
    text-wrap: balance;
}

.sr-wip .sr-wip__lead {
    margin: 0;
    color: var(--sr-wip-muted);
    font-size: 1.6rem;
    line-height: 1.7;
}

/* Progress: label left, percentage right, orange bar on a grey track. The percentage is the bar's own width
   (style="width: 60%" on .sr-wip__bar-fill, set In Admin); the script prints it and grows the bar in on load. */
.sr-wip__progress {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.sr-wip__progress-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sr-wip__progress-label {
    color: var(--sr-wip-muted);
}

.sr-wip__progress-value {
    color: var(--sr-wip-ink);
    font-variant-numeric: tabular-nums;
}

.sr-wip__bar {
    height: 4px;
    border-radius: 999px;
    background: var(--sr-wip-line);
    overflow: hidden;
}

.sr-wip__bar-fill {
    height: 100%;
    border-radius: inherit;
    background: #f26a21;
    transform-origin: left center;
}

.sr-wip.is-animating .sr-wip__bar-fill {
    animation: sr-wip-grow 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

@keyframes sr-wip-grow {
    from {
        transform: scaleX(0);
    }
}

.sr-wip__actions {
    margin-top: 16px;
    padding-top: 32px;
    border-top: 1px solid var(--sr-wip-line);
}

/* Outlined pill, filled on hover */
.sr-wip a.sr-wip__btn,
.sr-wip a.sr-wip__btn:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 52px;
    padding: 0 28px;
    border: 1px solid var(--sr-wip-ink);
    border-radius: 999px;
    background: transparent;
    color: var(--sr-wip-ink);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sr-wip a.sr-wip__btn:hover,
.sr-wip a.sr-wip__btn:focus {
    background: var(--sr-wip-ink);
    color: #ffffff;
    text-decoration: none;
}

.sr-wip a.sr-wip__btn:focus-visible {
    outline: 3px solid rgba(242, 106, 33, 0.6);
    outline-offset: 4px;
}

/* Below 1024px the header is the fixed floating pill; the page reserves 76px for it (satrunner-header.css) */
@media (max-width: 1023px) {
    .sr-wip {
        min-height: calc(100vh - 76px);
    }
}

/* Mobile and Tablet portrait: text across the width, still centred on the y-axis, the hills along the bottom */
@media (max-width: 448px), (max-width: 1023px) and (orientation: portrait) {
    .sr-wip {
        padding-top: 56px;
        padding-bottom: 56px;
        background-image:
            linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.5) 55%, rgba(255, 255, 255, 0) 85%),
            url('../images/sr-wip-landscape.webp');
        background-position: center, 70% bottom;
        background-size: cover, auto 60%;
    }

    .sr-wip__body {
        width: 100%;
        max-width: 640px;
    }
}

@media (max-width: 448px) {
    .sr-wip {
        padding-right: 16px;
        padding-left: 16px;
    }

    .sr-wip a.sr-wip__btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sr-wip.is-animating .sr-wip__bar-fill {
        animation: none;
    }

    .sr-wip a.sr-wip__btn {
        transition: none;
    }
}
