:root {
    --vibes-checkout-header-bg: #060807;
    --vibes-checkout-header-surface: #101512;
    --vibes-checkout-header-text: #ffffff;
    --vibes-checkout-header-muted: rgba(255, 255, 255, 0.68);
    --vibes-checkout-header-line: rgba(255, 255, 255, 0.18);
    --vibes-checkout-header-green: #28c500;
    --vibes-checkout-header-green-dark: #159d00;
}

body.vibes-checkout-layout {
    background: #f8faf8;
}

.vibes-checkout-layout .main {
    background: transparent;
}

.vibes-checkout-layout .content,
.vibes-checkout-content {
    padding-top: 1rem !important;
    top: 0 !important;
}

.vibes-checkout-layout--agreement {
    overflow-x: hidden;
}

.vibes-checkout-layout--agreement .vibes-checkout-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.vibes-checkout-layout .breadcrumbs {
    margin: 0;
    padding: 1rem 1rem 0;
}

.vibes-checkout-header {
    background:
        linear-gradient(
            180deg,
            var(--vibes-checkout-header-surface) 0%,
            var(--vibes-checkout-header-bg) 100%
        );
    color: var(--vibes-checkout-header-text);
    padding:
        max(0.75rem, env(safe-area-inset-top))
        clamp(1rem, 2.5vw, 2.5rem)
        0.75rem;
}

.vibes-checkout-header__inner {
    margin: 0 auto;
    max-width: 1440px;
}

.vibes-checkout-header__top {
    align-items: center;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    min-height: 72px;
}

.vibes-checkout-header__back,
.vibes-checkout-header__secure {
    align-items: center;
    color: var(--vibes-checkout-header-text);
    display: inline-flex;
    font-size: 0.94rem;
    font-weight: 700;
    gap: 0.5rem;
    min-height: 44px;
    text-decoration: none;
}

.vibes-checkout-header__back {
    color: rgba(255, 255, 255, 0.82);
    justify-self: start;
}

.vibes-checkout-header__back:hover,
.vibes-checkout-header__back:focus-visible {
    color: var(--vibes-checkout-header-text);
}

.vibes-checkout-header__secure {
    color: var(--vibes-checkout-header-text);
    justify-content: flex-end;
    justify-self: end;
}

.vibes-checkout-header__right {
    align-items: center;
    display: inline-flex;
    gap: 0.75rem;
    justify-content: flex-end;
    justify-self: end;
    min-width: 0;
}

.vibes-checkout-header__back-icon,
.vibes-checkout-header__secure-icon {
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

.vibes-checkout-header__secure-icon {
    color: var(--vibes-checkout-header-green);
    flex: 0 0 auto;
    height: 30px;
    width: 30px;
}

.vibes-checkout-header__brand {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    justify-self: center;
    max-width: min(100%, 170px);
    min-height: 44px;
    text-align: center;
}

.vibes-checkout-header__logo {
    display: block;
    height: auto;
    max-height: 58px;
    max-width: 145px;
    object-fit: contain;
    width: 100%;
}

.vibes-checkout-header__brand-text {
    color: var(--vibes-checkout-header-text);
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1;
}

.vibes-checkout-progress {
    margin-top: 0.2rem;
    padding-bottom: 0.35rem;
}

.vibes-checkout-progress__list {
    align-items: flex-start;
    display: flex;
    gap: 0.85rem;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.vibes-checkout-progress__step {
    align-items: flex-start;
    color: var(--vibes-checkout-header-muted);
    display: flex;
    flex: 0 1 265px;
    gap: 0.7rem;
    min-width: 0;
    position: relative;
    align-items: baseline;
}

.vibes-checkout-progress__step:not(:last-child)::after {
    background: var(--vibes-checkout-header-line);
    content: '';
    height: 2px;
    left: 46px;
    position: absolute;
    right: -0.85rem;
    top: 16px;
    z-index: 0;
}

.vibes-checkout-progress__step.is-completed:not(:last-child)::after {
    background: linear-gradient(
        90deg,
        var(--vibes-checkout-header-green-dark) 0%,
        var(--vibes-checkout-header-green) 100%
    );
}

.vibes-checkout-progress__marker {
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: var(--vibes-checkout-header-text);
    display: inline-flex;
    flex: 0 0 32px;
    font-size: 0.86rem;
    font-weight: 900;
    height: 32px;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.vibes-checkout-progress__label-wrap {
    background: var(--vibes-checkout-header-bg);
    display: grid;
    gap: 0.05rem;
    margin-left: -0.25rem;
    min-width: 0;
    padding: 0 0.25rem;
    position: relative;
    z-index: 1;
}

.vibes-checkout-progress__label {
    color: var(--vibes-checkout-header-text);
    display: block;
    font-size: 0.92rem;
    font-weight: 850;
    line-height: 1.15;
}

.vibes-checkout-progress__status {
    color: var(--vibes-checkout-header-muted);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.vibes-checkout-progress__step.is-completed .vibes-checkout-progress__marker,
.vibes-checkout-progress__step.is-current .vibes-checkout-progress__marker {
    background:
        linear-gradient(
            180deg,
            #37da00 0%,
            var(--vibes-checkout-header-green) 55%,
            var(--vibes-checkout-header-green-dark) 100%
        );
    border-color: transparent;
    color: #071000;
}

.vibes-checkout-progress__step.is-completed .vibes-checkout-progress__status,
.vibes-checkout-progress__step.is-current .vibes-checkout-progress__status {
    color: var(--vibes-checkout-header-green);
}

.vibes-checkout-progress__step.is-upcoming .vibes-checkout-progress__label {
    color: rgba(255, 255, 255, 0.82);
}

.vibes-checkout-main {
    display: block;
    min-height: calc(100vh - 110px);
}

.vibes-checkout-header a:focus-visible,
.vibes-checkout-header button:focus-visible {
    outline: 3px solid rgba(40, 197, 0, 0.45);
    outline-offset: 3px;
}

@media (max-width: 767.98px) {
    .vibes-checkout-header {
        padding:
            max(0.7rem, env(safe-area-inset-top))
            1rem
            0.7rem;
    }

    .vibes-checkout-header__top {
        gap: 0.45rem;
        grid-template-columns: auto minmax(0, 1fr) auto;
        min-height: 56px;
    }

    .vibes-checkout-header__back,
    .vibes-checkout-header__secure {
        font-size: 0.82rem;
        gap: 0.35rem;
        min-height: 38px;
    }

    .vibes-checkout-header__right {
        gap: 0.35rem;
    }

    .vibes-checkout-header__back-label,
    .vibes-checkout-header__secure-label {
        display: none;
    }

    .vibes-checkout-header__logo {
        max-height: 38px;
        max-width: 112px;
    }

    .vibes-checkout-header__secure-icon {
        height: 26px;
        width: 26px;
    }

    .vibes-checkout-header__right .vibes-language-switcher--compact .vibes-language-switcher__button {
        min-width: 29px;
        height: 26px;
        padding: 0 7px;
        font-size: 10px;
    }

    @media (max-width: 380px) {
        .vibes-checkout-header {
            padding-right: 0.75rem;
            padding-left: 0.75rem;
        }

        .vibes-checkout-header__top {
            gap: 0.35rem;
        }

        .vibes-checkout-header__logo {
            max-width: 96px;
            max-height: 34px;
        }

        .vibes-checkout-header__right {
            gap: 0.25rem;
        }

        .vibes-checkout-header__secure-icon {
            height: 24px;
            width: 24px;
        }

        .vibes-checkout-header__right .vibes-language-switcher--compact .vibes-language-switcher__button {
            min-width: 27px;
            height: 24px;
            padding: 0 6px;
        }
    }

    .vibes-checkout-progress__list {
        /* flex-direction: column; */
        gap: 0.55rem;
    }

    .vibes-checkout-progress__step {
        align-items: center;
        flex: 1 1 auto;
        gap: 0.65rem;
    }

    .vibes-checkout-progress__step:not(:last-child)::after {
        /* bottom: -0.55rem;
        height: 0.55rem; */
        left: 40px;
        /* right: auto; */
        top: auto;
        width: 77%;
    }

    .vibes-checkout-progress__label {
        font-size: 0.88rem;
    }
}
