/* Header */
.cb-header {
    padding: 16px 0;
    background: #fff;
    border-bottom: 1px solid var(--color-accent);
}

.cb-header__inner {
    display: grid;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
}

.cb-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.cb-brand__mark {
    width: 34px;
    height: 34px;
}

.cb-brand__mark img {
    width: 100%;
    height: 100%;
}

.cb-brand__v {
    font-weight: 900;
    color: #fff;
    font-size: 18px;
    letter-spacing: -0.02em;
    transform: translateY(-0.5px);
}

.cb-brand__name {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: var(--color-primary);
    font-family: var(--font-family);

}

.cb-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    justify-content: center;
}

.cb-nav__link {
    color: var(--color-subtle-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    font-family: var(--font-family);
    transition: 0.2s ease-in;
}

.cb-nav__link:hover {
    color: var(--color-primary);
}

.cb-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.cb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 23px;
    border-radius: 14px;
    border: 1px solid var(--color-accent);
    color: var(--color-primary);
    text-decoration: none;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
}

.cb-btn:hover {
    border-color: var(--color-primary);
}

.cb-btn--full {
    width: 100%;
}

.cb-burger {
    display: none;
    width: 24px;
    height: 24px;
    border: none;
    background-color: #fff;
    padding: 0;
    cursor: pointer;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    flex-direction: column;
}

.cb-burger__line {
    width: 18px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 999px;
}

.cb-burger__line:last-child {
    width: 9px;
}

.cb-mnav {
    /**/
}

.cb-mnav__inner {
    padding: 14px 0 0;
    display: grid;
    gap: 12px;
}

.cb-mnav__link {
    padding: 10px 24px;
    color: var(--color-subtle-text);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

/* Mobile */
@media (max-width: 980px) {
    .cb-header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .cb-header__inner {
        /*grid-template-columns: 1fr auto;*/
    }

    /*.cb-nav {*/
    /*    display: none;*/
    /*}*/
    /*.cb-btn {*/
    /*    display: none;*/
    /*}*/
    /*.cb-burger {*/
    /*    display: inline-flex;*/
    /*}*/
}

/* === Burger animation === */
/*.cb-burger {*/
/*    position: relative;*/
/*}*/

/*.cb-burger__line {*/
/*    display: block;*/
/*    transition: transform 220ms ease, opacity 180ms ease, width 220ms ease;*/
/*    transform-origin: center;*/
/*}*/

/*!* When open -> turn into X *!*/
/*.cb-header.is-open .cb-burger__line:nth-child(1) {*/
/*    transform: translateY(8px) rotate(45deg);*/
/*    width: 18px;*/
/*}*/

/*.cb-header.is-open .cb-burger__line:nth-child(2) {*/
/*    opacity: 0;*/
/*    transform: scaleX(0.6);*/
/*}*/

/*.cb-header.is-open .cb-burger__line:nth-child(3) {*/
/*    transform: translateY(-8px) rotate(-45deg);*/
/*    width: 18px;*/
/*}*/

/*!* === Mobile menu smooth open/close === *!*/
/*.cb-mnav {*/
/*    overflow: hidden;*/
/*    max-height: 0;*/
/*    opacity: 0;*/
/*    transform: translateY(-6px);*/
/*    transition: max-height 260ms ease, opacity 200ms ease, transform 200ms ease;*/
/*    will-change: max-height, opacity, transform;*/
/*}*/

/*!* Open state *!*/
/*.cb-header.is-open .cb-mnav {*/
/*    opacity: 1;*/
/*    transform: translateY(0);*/
/*}*/

/*!* Optional: reduce motion *!*/
/*@media (prefers-reduced-motion: reduce) {*/
/*    .cb-burger__line,*/
/*    .cb-mnav {*/
/*        transition: none;*/
/*    }*/
/*}*/

/*
 * The full header — nav, market switcher and login — used by funnels that opt in via `header_nav` /
 * `header_markets` / `header_login`. Funnels that declare none of these never match `.cb-header--full`, so their
 * logo-only header is untouched.
 */
.cb-header--full .cb-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cb-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.cb-nav__link {
    color: #4a4a68;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
}

.cb-nav__link:hover {
    color: #0a145d;
}

.cb-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cb-market {
    position: relative;
}

.cb-market__current {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e2e7f2;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 15px;
    color: #0d0e2c;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.cb-market__current::-webkit-details-marker {
    display: none;
}

.cb-market__current img,
.cb-market__option img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.cb-market__chevron {
    width: 7px;
    height: 7px;
    border-right: 2px solid #8c8ca2;
    border-bottom: 2px solid #8c8ca2;
    transform: rotate(45deg);
    margin-left: 2px;
}

.cb-market[open] .cb-market__chevron {
    transform: rotate(-135deg);
}

.cb-market__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    min-width: 100%;
    background: #fff;
    border: 1px solid #e2e7f2;
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 12px 30px rgb(13 14 44 / 10%);
}

.cb-market__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 15px;
    color: #0d0e2c;
    text-decoration: none;
    white-space: nowrap;
}

.cb-market__option:hover,
.cb-market__option.is-current {
    background: #f3f7fe;
}

.cb-header__login {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e2e7f2;
    border-radius: 10px;
    padding: 9px 30px;
    font-size: 15px;
    color: #0d0e2c;
    text-decoration: none;
}

.cb-header__login:hover {
    border-color: #0a145d;
}

@media (max-width: 980px) {

    .cb-nav {
        display: none;
    }

    .cb-header__login {
        padding: 9px 18px;
    }
}

/* At phone widths the market label is dropped to its flag so the logo, picker and login stay on one row. */
@media (max-width: 560px) {

    .cb-header--full .cb-header__inner {
        gap: 10px;
    }

    .cb-market__current {
        padding: 8px 10px;
        font-size: 0;
        gap: 6px;
    }

    .cb-market__current img {
        width: 20px;
        height: 20px;
    }

    .cb-header__login {
        padding: 8px 14px;
        font-size: 14px;
    }
}
