/* Preserve each header's original collapsed/mobile search interaction. */
.site-header .channel-search-jable .channel-search-select,
.site-header .channel-search-jable .channel-search-submit {
    display: none;
}

.site-header .channel-search-jable:focus-within input {
    max-width: 120px;
    min-width: 0;
    padding-left: .35rem;
    color: #fff;
}

.site-header .channel-search-jable:focus-within .channel-search-select,
.site-header .channel-search-jable:focus-within .channel-search-submit {
    display: inline-block;
}

.site-header .channel-search-jable .channel-search-select {
    flex: 0 0 90px;
    width: 90px;
    height: 32px;
    margin-left: 6px;
    padding: 0 4px;
    border: 1px solid #394565;
    border-radius: 4px;
    background: #151b2c;
    color: #fff;
    font-size: 12px;
}

.site-header .channel-search-jable .channel-search-submit {
    flex: 0 0 32px;
    height: 32px;
    padding: 4px;
    border: 0;
    background: transparent;
    color: #91a5f4;
}

.header .top .channel-search-javeve {
    display: inline-flex;
    align-items: stretch;
    max-width: 100%;
}

.header .top .channel-search-javeve .search-input {
    width: 220px;
    min-width: 0;
    flex: 1 1 auto;
}

.header .top .channel-search-javeve .channel-search-select {
    flex: 0 0 90px;
    width: 90px;
    padding: 0 4px;
    border: 0;
    border-left: 1px solid #606060;
    border-radius: 0;
    background: #464646;
    color: #fff;
    font-size: 12px;
}

.header .top .channel-search-javeve .search-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

header .channel-search-supjav-center {
    min-width: 0;
}

header #search.channel-search-supjav input {
    order: 0;
    min-width: 0;
    width: 0;
    flex: 1 1 auto;
    padding-left: 12px;
}

header #search.channel-search-supjav .channel-search-select {
    order: 1;
    flex: 0 0 90px;
    width: 90px;
    height: 30px;
    padding: 0 4px;
    border: 0;
    border-left: 1px solid #d6d6d6;
    border-radius: 0;
    background: transparent;
    color: #212121;
    font-size: 12px;
}

header #search.channel-search-supjav button {
    order: 2;
    flex: 0 0 42px;
    width: 42px;
}

header #search.channel-search-123av .channel-search-select,
header #search.channel-search-123av .channel-search-submit {
    display: none;
}

header #search.channel-search-123av:focus-within input {
    width: 150px;
    padding-right: 8px;
}

header #search.channel-search-123av.show .channel-search-select,
header #search.channel-search-123av.show .channel-search-submit,
header #search.channel-search-123av:focus-within .channel-search-select,
header #search.channel-search-123av:focus-within .channel-search-submit {
    display: inline-flex;
}

header #search.channel-search-123av .channel-search-select {
    flex: 0 0 90px;
    width: 90px;
    height: 28px;
    padding: 0 4px;
    border: 0;
    border-left: 1px solid #313a4c;
    border-radius: 0;
    background: #0f121a;
    color: #dee2e6;
    font-size: 12px;
}

header #search.channel-search-123av .channel-search-submit {
    min-width: 34px;
    flex: 0 0 34px;
    padding: 0 8px;
    color: #e85a83;
}

@media (max-width: 1199px) {
    .site-header .channel-search-jable-wrap {
        min-width: 54px;
    }

    .site-header .channel-search-jable:focus-within {
        position: absolute;
        top: 100%;
        right: 0;
        width: min(420px, calc(100vw - 20px));
        height: 44px !important;
        padding: 4px 8px;
        border: 1px solid #394565;
        border-radius: 5px;
        background: #0a0d17;
    }

    .site-header .channel-search-jable:focus-within input {
        flex: 1 1 auto;
        width: 0;
        max-width: none;
    }

    header #search.channel-search-123av.show,
    header #search.channel-search-123av:focus-within {
        position: absolute;
        /* The theme resets top on all direct .right children with !important. */
        top: calc(100% + 10px) !important;
        right: 0;
        width: min(420px, calc(100vw - 20px));
        height: 44px;
        padding: 4px;
        border: 1px solid #313a4c;
        border-radius: 8px;
    }

    header #search.channel-search-123av.show input,
    header #search.channel-search-123av:focus-within input {
        width: 0;
        min-width: 0;
        flex: 1 1 auto;
        padding-right: 4px;
    }
}

@media (min-width: 769px) and (max-width: 847px) {
    .header .top .channel-search-javeve {
        display: flex;
        width: 420px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .header .top .channel-search-javeve {
        display: none;
    }

    .header .top .channel-search-javeve.show {
        display: flex;
        box-sizing: border-box;
        width: 100%;
    }

    .header .top .channel-search-javeve .search-input {
        width: 0;
        padding-left: 8px;
        padding-right: 8px;
    }

    header #search.channel-search-supjav.active {
        box-sizing: border-box;
        width: 100%;
        max-width: none;
    }

    header #search.channel-search-supjav.active .channel-search-select {
        color: #fff;
        background: #494949;
        border-left-color: #737373;
    }
}
