/**
 * Price increase announcement
 * Badge, struck-through future price, savings line, sitewide banner.
 */

.price-increase {
    display: block;
    margin-top: 4px;
    font-family: var(--font-body);
    line-height: 1.4;
}

.price-increase__future {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-gray, #8a8a8a);
}

.price-increase__saving {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary, #232323);
}

.price-increase--compact .price-increase__future {
    font-size: 12px;
}

.price-increase__badge {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 10px;
    background-color: var(--color-accent, #ffcfd9);
    color: var(--color-primary, #232323);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* The Kursplan section sits on a dark background */
.course-curriculum__price-wrap .price-increase__future {
    color: rgba(255, 255, 255, 0.6);
}

.course-curriculum__price-wrap .price-increase__saving {
    color: var(--color-accent, #ffcfd9);
}

/* Sitewide strip */
.price-increase-banner {
    background-color: var(--color-accent, #ffcfd9);
    color: var(--color-primary, #232323);
}

/*
 * Making room for the strip.
 *
 * .header-top-bar and .site-header are position:fixed and float over the page — the hero
 * image is meant to sit behind them, and .breadcrumbs carries its own 80px top padding to
 * clear them. A banner in normal flow therefore renders underneath the header, invisible.
 *
 * Taking the banner out of the flow instead would just move the problem: it would cover
 * the breadcrumb text on inner pages and the top of the hero on the front page. So the
 * fixed header is pushed down by the banner's height and every existing clearance keeps
 * working untouched. The banner then scrolls away like ordinary content.
 *
 * --price-banner-offset is the distance from the top of the document to the bottom of the
 * banner, measured in template-parts/components/price-increase-banner.php. It falls back
 * to 0px, so a failed measurement leaves the header exactly where it is today.
 */
.has-price-banner .header-top-bar {
    top: var(--price-banner-offset, 0px) !important;
}

.has-price-banner .site-header,
.has-price-banner #site-header {
    /* 33.5px is the height of .header-top-bar, which sits above the header on desktop. */
    top: calc(var(--price-banner-offset, 0px) + 33.5px) !important;
}

/* Past a 10px scroll (assets/js/main.js) the header pins itself to the top. The banner has
   scrolled out of the way by then, so it goes back to 0 exactly as it does without one. */
.has-price-banner .site-header.scrolled,
.has-price-banner #site-header.scrolled {
    top: 0 !important;
}

@media (max-width: 767px) {
    /* No top bar on mobile — the header sits directly under the banner. */
    .has-price-banner .site-header,
    .has-price-banner #site-header {
        top: var(--price-banner-offset, 0px) !important;
    }
}

/*
 * The theme ships no styles for .screen-reader-text, so the "Skip to content" link is a
 * plain visible anchor taking 20px at the top of every page. It has always been there,
 * hidden behind the fixed header. Offsetting the header would expose it, so give it the
 * standard treatment: invisible until focused, which is what the class is for.
 */
.skip-link.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link.screen-reader-text:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 400;
    width: auto;
    height: auto;
    margin: 0;
    padding: 12px 20px;
    clip: auto;
    background-color: #fff;
    color: var(--color-primary, #232323);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
}

.price-increase-banner__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 10px 24px;
    flex-wrap: wrap;
}

.price-increase-banner__text {
    margin: 0;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.price-increase-banner__cta {
    flex-shrink: 0;
    padding: 6px 16px;
    background-color: var(--color-primary, #232323);
    color: #fff;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
}

.price-increase-banner__cta:hover,
.price-increase-banner__cta:focus {
    background-color: #000;
    color: #fff;
}

@media (max-width: 768px) {
    .price-increase-banner__inner {
        padding: 10px 16px;
        gap: 10px;
    }

    .price-increase-banner__text {
        font-size: 13px;
    }
}

@media print {
    .price-increase-banner {
        display: none;
    }
}
