/* =======================================================
   PLPC — поиск по заголовкам статей
   Версия 3.0
======================================================= */

.plpc-blog-search {
    margin: 0 0 28px;
}

.plpc-blog-search__field {
    position: relative;
    width: 100%;
}

.plpc-blog-search__input {
    width: 100%;
    height: 56px;
    padding: 0 52px 0 56px;
    box-sizing: border-box;

    font-family: inherit;
    font-size: 16px;
    line-height: 1.4;

    color: #0f172a;
    background:
        url("/wa-data/public/site/poisk.svg")
        18px center / 20px 20px
        no-repeat,
        #ffffff;

    border: 1px solid #dbe2ea;
    border-radius: 14px;
    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.plpc-blog-search__input::placeholder {
    color: #94a3b8;
}

.plpc-blog-search__input:hover {
    border-color: #b8c4d1;
}

.plpc-blog-search__input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.plpc-blog-search__clear {
    position: absolute;
    top: 50%;
    right: 12px;

    display: none;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;
    padding: 0;

    font-family: Arial, sans-serif;
    font-size: 22px;
    line-height: 1;

    color: #64748b;
    background: #f1f5f9;

    border: 0;
    border-radius: 50%;

    cursor: pointer;
    transform: translateY(-50%);

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.plpc-blog-search_has-value .plpc-blog-search__clear {
    display: flex;
}

.plpc-blog-search__clear:hover {
    color: #2563eb;
    background: #e2e8f0;
}

.plpc-blog-search__clear:active {
    transform: translateY(-50%) scale(0.94);
}

.plpc-blog-search__status {
    min-height: 22px;
    margin-top: 10px;

    font-size: 14px;
    line-height: 1.5;
    color: #64748b;
}

.plpc-blog-search__results {
    margin-top: 6px;
    overflow: hidden;

    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);

    animation: plpc-blog-search-results-in 0.2s ease;
}

.plpc-blog-search__results[hidden] {
    display: none;
}

.plpc-blog-search__result {
    border-bottom: 1px solid #e9eef4;
}

.plpc-blog-search__result:last-child {
    border-bottom: 0;
}

.plpc-blog-search__result-link {
    position: relative;
    display: block;

    padding: 18px 48px 18px 20px;

    font-size: 17px;
    font-weight: 600;
    line-height: 1.45;

    color: #0f172a;
    text-decoration: none;

    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.plpc-blog-search__result-link::after {
    content: "→";

    position: absolute;
    right: 20px;
    top: 50%;

    font-size: 20px;
    color: #94a3b8;

    transform: translateY(-50%);
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.plpc-blog-search__result-link:hover,
.plpc-blog-search__result-link:focus,
.plpc-blog-search__result-link_is-active {
    color: #2563eb;
    background: #f8fafc;
    outline: none;
}

.plpc-blog-search__result-link:hover::after,
.plpc-blog-search__result-link:focus::after,
.plpc-blog-search__result-link_is-active::after {
    color: #2563eb;
    transform: translate(3px, -50%);
}

.plpc-blog-search__result-link mark {
    padding: 1px 2px;
    color: inherit;
    background: #dbeafe;
    border-radius: 3px;
}

.plpc-blog-search__empty {
    padding: 24px 20px;

    font-size: 16px;
    line-height: 1.5;
    color: #64748b;
    text-align: center;
}

.plpc-blog-search_is-loading .plpc-blog-search__status::before {
    content: "";

    display: inline-block;
    width: 13px;
    height: 13px;
    margin-right: 7px;

    vertical-align: -2px;

    border: 2px solid #cbd5e1;
    border-top-color: #2563eb;
    border-radius: 50%;

    animation: plpc-blog-search-spinner 0.7s linear infinite;
}

@keyframes plpc-blog-search-spinner {
    to {
        transform: rotate(360deg);
    }
}

@keyframes plpc-blog-search-results-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767px) {
    .plpc-blog-search {
        margin-bottom: 22px;
    }

    .plpc-blog-search__input {
        height: 50px;
        padding-left: 50px;

        font-size: 16px;
        background-position: 16px center;
        background-size: 19px 19px;
        border-radius: 12px;
    }

    .plpc-blog-search__result-link {
        padding: 16px 42px 16px 16px;
        font-size: 16px;
    }

    .plpc-blog-search__result-link::after {
        right: 16px;
    }
}
