.header-top {
    background-color: #f5f5f5;
}

.header-top-inner {
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    align-items: center;
    min-height: 5rem;
}

.header-moto {
    color: #2F3342;
}

.header-top-link {
    display: flex;
    align-items: center;

    color: var(--font-main-color);
}

.header-top-link.selected {
    font-weight: 700;
}

.header-top-link + .header-top-link {
    margin-left: var(--normal-gap);
}

.header-mid {
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;

    min-height: 11.2rem;
}

.header-logo {
    align-self: center;
    display: block;
    width: 33rem;
    height: 4.7rem;
    background: url('/i/header-logo-th.svg') no-repeat center / contain;
}

.header-mid-menus {
    display: flex;
    flex-flow: column;
    align-items: flex-end;
}

.header-mid-top {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    margin: auto 0;
}

.header-subscription {

}

.header-subscription > a {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--active-color);
}

.header-mid-top > * + * {
    margin-left: var(--normal-gap);
    padding-left: var(--normal-gap);
    border-left: 1px solid #C4C4C4;
}

.header-search {
    display: flex;
    flex-flow: row;
}

.header-search-input {
    width: 25.3rem;
    height: 3.6rem;
    padding: 1rem 4rem 1rem 2rem;
    border: 1px solid rgba(104, 99, 167, 0.3);
    border-radius: 5.2rem;
    background: #FFFFFF url('/i/icon-search.svg') no-repeat center right .8rem / 2rem 2rem;
}

.header-search-button {
    width: 3.6rem;
    margin-left: -3.6rem;
    border: 1px solid transparent;
    border-radius: 50%;
    opacity: .5;
    cursor: pointer;
}

.header-burger {
    display: none;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    height: 3.6rem;
}
.header-burger:after {
    content: '';
    height: 2rem;
    width: 2rem;
    background: url('/i/icon-burger.svg') no-repeat center / contain;
}

.subscription-warning {
    padding-right: 2rem;
    background: url('/i/attention.png') no-repeat right center / contain;
}

.header-main-menu {
    margin-bottom: var(--tiny-gap);

    display: flex;
    flex-flow: row nowrap;
}

.header-main-menu > * + * {
    margin-left: var(--small-gap);
}

.header-main-menu > * {
    padding-bottom: .4rem;
    border-bottom: .2rem solid transparent;

    font: 600 1.3rem/1.6rem Montserrat;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--font-main-color);
    white-space: nowrap;
}

.header-main-menu > *.selected, .header-main-menu > *:hover {
    border-color: var(--active-color);
}

.header-loc-selector {
    position: relative;
    z-index: 2;
    display: flex;
    flex-flow: column nowrap;
    margin-left: auto;
    text-transform: none;
}

.header-locs {
    position: absolute;
    z-index: 1000;
    left: 0;
    top: 100%;
    display: none;
    flex-flow: column nowrap;
    margin-left: auto;
    padding: 1rem 1.4rem;
    background: #ffffff;
    box-shadow: var(--common-shadow);
    list-style-type: none;
    gap: 0.6rem;
}

.header-loc-selector:hover .header-locs,
.header-loc-selector:focus-within > .header-locs {
    display: flex;
}

.header-loc {
    display: flex;
    align-items: center;
    color: #3D4153;
    cursor: pointer;
}

.header-loc-selector > .header-loc {
    margin-left: 1.4rem;
    margin-right: 2rem;
}

.header-loc-selector > .header-loc:after {
    content: '';
    float: right;
    margin: 0 -2rem 0 .8rem;
    border: .6rem solid transparent;
    border-top-color: #E0E1DD;
    border-bottom: 0;
}

@media (max-width: 1023px) {
    .header-top {
        display: none;
    }

    .header-burger {
        display: flex;
    }

    .header-main-menu {
        display: none;
    }

    .header-subscription {
        display: none;
    }

    .header-mid-top > * + * {
        margin-left: 3.6rem;
        padding-left: 0;
        border-left: none;
    }
}

@media (max-width: 767px) {
    .header-mid {
        min-height: 7.5rem;
    }

    .header-search:not(:focus-within) .header-search-input {
        width: 2rem;
        padding: 1rem;
        cursor: pointer;
        background-position: center right;
        border-color: transparent;
    }

    .header-search:not(:focus-within) .header-search-button {
        display: none;
    }
}
