
/* MediaDose shared header search polish */
.header-search {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.header-search,
.header-search * {
    box-sizing: border-box;
}

.header-search__input {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-right: 136px !important;
}

.header-search__submit {
    min-width: 86px;
    max-width: calc(100% - 12px);
    white-space: nowrap;
}

.header-search__clear {
    position: absolute;
    right: 96px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.82);
    font-size: 18px;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, opacity .2s ease;
    z-index: 2;
}

.header-search.has-value .header-search__clear {
    display: inline-flex;
}

.header-search__clear:hover {
    background: rgba(255,255,255,0.10);
    color: #fff;
}

.header-search__result.is-active,
.header-search__more.is-active {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.header-search__section {
    padding: 12px 14px 0;
}

.header-search__section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.56);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.header-search__clear-history {
    border: 0;
    background: transparent;
    color: rgba(255,255,255,0.62);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: color .2s ease;
}

.header-search__clear-history:hover {
    color: #fff;
}

.header-search__history {
    display: grid;
    gap: 8px;
    padding: 0 14px 14px;
}

.header-search__recent {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 14px;
    border-radius: 16px;
    text-decoration: none;
    color: #fff;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.header-search__recent:hover,
.header-search__recent.is-active {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.10);
    color: #fff;
}

.header-search__recent-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.86);
    font-size: 14px;
}

.header-search__recent-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.header-search__recent-title {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-search__recent-meta {
    margin-top: 3px;
    color: rgba(255,255,255,0.54);
    font-size: 12px;
    line-height: 1.3;
}

.header-search__shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 14px 14px;
}

.header-search__shortcut {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 76px;
    padding: 12px 14px;
    border-radius: 16px;
    text-decoration: none;
    color: #fff;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.header-search__shortcut:hover {
    color: #fff;
    transform: translateY(-1px);
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.10);
}

.header-search__shortcut strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
}

.header-search__shortcut span {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,0.58);
    font-size: 12px;
    line-height: 1.35;
}

.header-mobile-search {
    display: none;
}

.header-mobile-search .header-search {
    width: 100%;
}

@media (max-width: 768px) {
    .header__content {
        flex-wrap: wrap !important;
    }

    .header__nav .header__search-item {
        display: none !important;
    }

    .header-mobile-search {
        display: block;
        flex: 1 0 100%;
        width: 100%;
        margin-top: 12px;
        min-width: 0;
        max-width: 100%;
        overflow: visible;
    }

    .header-mobile-search .header-search,
    .header-mobile-panel .header-search {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .header-mobile-search .header-search__input,
    .header-mobile-panel .header-search__input {
        height: 48px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding-right: 88px !important;
    }

    .header-mobile-search .header-search__submit,
    .header-mobile-panel .header-search__submit {
        width: 46px;
        min-width: 46px;
        padding: 0;
        font-size: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, rgba(77, 123, 255, 0.88), rgba(166, 87, 255, 0.9));
        border: 1px solid rgba(255,255,255,0.14);
        color: #fff;
        box-shadow: 0 10px 24px rgba(33, 20, 73, 0.32);
        z-index: 3;
    }

    .header-mobile-search .header-search__submit::before,
    .header-mobile-panel .header-search__submit::before {
        content: '⌕';
        display: inline-block;
        font-size: 18px;
        line-height: 1;
        color: inherit;
    }

    .header-mobile-search .header-search__clear,
    .header-mobile-panel .header-search__clear {
        right: 56px;
    }

    .header-mobile-search .header-search__dropdown,
    .header-mobile-panel .header-search__dropdown {
        position: static;
        margin-top: 8px;
        left: auto;
        right: auto;
        top: auto;
    }

    .header-search__shortcuts {
        grid-template-columns: 1fr;
    }
}
