/* MATCHSHOCK_GLOBAL_SEARCH_V1 */

.ms-global-search {
    position: relative;
    flex: 0 0 auto;
    z-index: 80;
}

.ms-global-search__toggle {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.ms-global-search__toggle:hover,
.ms-global-search.is-open
.ms-global-search__toggle {
    border-color: rgba(239, 17, 17, 0.55);
    background: rgba(239, 17, 17, 0.1);
    color: #fff;
}

.ms-global-search__toggle > span:first-child {
    font-size: 18px;
    line-height: 1;
}

.ms-global-search__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(520px, calc(100vw - 32px));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(17, 19, 23, 0.985);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(18px);
}

.ms-global-search__panel[hidden] {
    display: none;
}

.ms-global-search__input-wrap {
    display: grid;
    grid-template-columns:
        22px
        minmax(0, 1fr)
        34px;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ms-global-search__input-wrap > span {
    opacity: 0.6;
    font-size: 20px;
    text-align: center;
}

.ms-global-search__input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
}

.ms-global-search__input::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

.ms-global-search__close {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 20px;
}

.ms-global-search__close:hover {
    background: rgba(255, 255, 255, 0.11);
    color: #fff;
}

.ms-global-search__status {
    padding: 9px 13px 7px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ms-global-search__results {
    max-height: min(520px, 62vh);
    overflow-y: auto;
    padding: 4px 7px 8px;
}

.ms-global-search__result {
    display: grid;
    grid-template-columns:
        38px
        minmax(0, 1fr)
        auto;
    align-items: center;
    gap: 10px;
    padding: 9px 8px;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
}

.ms-global-search__result:hover,
.ms-global-search__result.is-active {
    background: rgba(255, 255, 255, 0.065);
}

.ms-global-search__media {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    overflow: hidden;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.055);
}

.ms-global-search__media img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.ms-global-search__fallback {
    font-size: 18px;
}

.ms-global-search__result-copy {
    min-width: 0;
}

.ms-global-search__result-copy strong {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-global-search__result-copy small {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.52);
    font-size: 10px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-global-search__type {
    padding: 4px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: rgba(255, 255, 255, 0.55);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ms-global-search__hint {
    padding: 8px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.35);
    font-size: 9px;
    font-weight: 700;
    text-align: right;
}

.ms-global-search button:focus-visible,
.ms-global-search input:focus-visible,
.ms-global-search a:focus-visible {
    outline: 2px solid rgba(255, 49, 49, 0.9);
    outline-offset: 2px;
}

@media (max-width: 820px) {
    .ms-global-search__toggle {
        width: 38px;
        min-width: 38px;
        padding: 0;
        border-radius: 50%;
    }

    .ms-global-search__toggle-label {
        display: none;
    }

    .ms-global-search__panel {
        position: fixed;
        top: 72px;
        right: 10px;
        left: 10px;
        width: auto;
        max-height: calc(100vh - 88px);
    }
}

@media (max-width: 620px) {
    .ms-global-search__panel {
        top: 64px;
        border-radius: 14px;
    }

    .ms-global-search__results {
        max-height: 58vh;
    }

    .ms-global-search__hint {
        display: none;
    }
}


/* MATCHSHOCK_ENTITY_FAVORITES_SEARCH_CSS_V1 */

.ms-global-search__result {
    grid-template-columns:
        minmax(0, 1fr)
        34px;
    gap: 5px;
    padding: 4px 6px 4px 4px;
}

.ms-global-search__result-main {
    display: grid;
    grid-template-columns:
        38px
        minmax(0, 1fr)
        auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 5px 4px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}

.ms-global-search__result:hover,
.ms-global-search__result.is-active {
    background: rgba(255, 255, 255, 0.065);
}

.ms-global-search__result.is-favorite {
    background: rgba(255, 190, 35, 0.025);
}

.ms-global-search__favorite {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    align-self: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    font: inherit;
    font-size: 18px;
    line-height: 1;
    transition:
        background 120ms ease,
        color 120ms ease,
        transform 120ms ease;
}

.ms-global-search__favorite:hover,
.ms-global-search__favorite:focus-visible {
    background: rgba(255, 190, 35, 0.1);
    color: #ffd56a;
    transform: scale(1.06);
}

.ms-global-search__favorite.is-active {
    color: #ffc83d;
}

@media (max-width: 620px) {
    .ms-global-search__result {
        grid-template-columns:
            minmax(0, 1fr)
            32px;
    }

    .ms-global-search__result-main {
        grid-template-columns:
            36px
            minmax(0, 1fr)
            auto;
        gap: 8px;
    }

    .ms-global-search__favorite {
        width: 28px;
        height: 28px;
        font-size: 17px;
    }
}

