/* =========================================================
   ALGOLIA SEARCH – COMBINED STYLES
   Sections:
   1) Searchbox
   2) Search input vendor resets
   3) Hits grid (layout)
   4) Hit card (container, thumb, description)
   5) Hit meta (titles, author, tags, footer)
   6) Pagination
   ========================================================= */


/* ===================== 1) SEARCHBOX ===================== */

.searchbox-field:not(.search-no-results .searchbox-field) {
    max-width: 701px;
    margin: 15px auto 0;
}

.searchbox-field .ais-SearchBox-form {
    position: relative;
}

.searchbox-field .ais-SearchBox-input {
    border: 1px solid var(--orange);
    width: 100%;
    height: 42px;
    padding: 0 47px;
    font-size: 18px;
    line-height: 22px;
}

.searchbox-field .ais-SearchBox-submit {
    position: absolute;
    background: url(../img/search-icon.svg) no-repeat center center/contain;
    appearance: none;
    border: none;
    width: 22px;
    height: 22px;
    left: 10px;
    top: 0;
    bottom: 0;
    margin: auto;
}

.searchbox-field .ais-SearchBox-reset svg,
.searchbox-field .ais-SearchBox-submit svg {
    display: none;
}

.searchbox-field .ais-SearchBox-reset {
    background: url(../img/hamburger-close-Icon.svg) no-repeat center center/15px;
    position: absolute;
    right: 0;
    width: 35px;
    height: 100%;
    appearance: none;
    border: none;
    cursor: pointer;
    top: 0;
}

.ais-SearchBox-loadingIndicator {
    display: none;
}


/* ===== 2) SEARCH INPUT VENDOR RESETS (webkit) ===== */

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    display: none;
}


/* ================== 3) HITS GRID (LAYOUT) ================== */

.posts-result .ais-Hits-list {
    display: grid;
    grid-gap: 24px;
    list-style: none;
}

@media all and (min-width: 768px) {
    .posts-result .ais-Hits-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-gap: 30px 40px;
    }
}

@media all and (min-width: 992px) {
    .posts-result .ais-Hits-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .ais-hits {
        padding: 0 35px;
    }
}


/* ========== 4) HIT CARD (CONTAINER, THUMB, DESCRIPTION) ========== */

.posts-result .hits-card {
    border-radius: 8.8px;
    box-shadow: 0px 0px 29.483px rgba(0, 0, 0, 0.10);
    overflow: hidden;
    align-items: flex-start;
    word-break: break-word;
    padding: 0;
    border-bottom: 14px solid transparent;
    transition: 0.3s all;
    display: flex;
    flex-wrap: wrap;
    height: 100%;
    color: var(--black);
    /* cursor: pointer; */
}

.posts-result .hits-card:hover {
    border-bottom-color: var(--orange);
}

.posts-result .post-thumb {
    height: 176px;
    overflow: hidden;
    width: 100%;
    position: relative;
}

.posts-result .post-thumb img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.posts-result .description {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px 40px 25px 30px;
    height: calc(100% - 176px);
}

.no-hits {
    font-size: 18px;
    line-height: 22px;
}


/* =================== 5) HIT META (TEXTUAL) =================== */

.hit-name {
    color: var(--black);
}

.hit-name:hover {
    text-decoration: underline;
}

.posts-result .hit-categories {
    font-size: 13px;
}

.hit-featured-post {
    font-size: 16px;
    line-height: 20px;
    font-weight: 400;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--black);
    margin: 15px 0 10px;
}

.hits-card__footer {
    margin-top: 30px;
}

.hit-author {
    display: flex;
    align-items: center;
    margin: 7px 0;
}

.hit-author-name {
    font-size: 14px;
    line-height: 18px;
    font-weight: 800;
    color: var(--black);
    padding: 0;
    display: block;
}

.author-details .hit-author-name:hover {
    color: var(--dark-red);
}

.blog-card-tag {
    font-size: 12px;
    line-height: 16px;
    color: var(--black);
    font-weight: 400;
    text-transform: capitalize;
}

.blog-card-tag:hover {
    text-decoration: underline;
}


/* ======================= 6) PAGINATION ======================= */

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 70px;
}

.ais-Pagination-list {
    display: flex;
    align-items: center;
    list-style: none;
}

.pagination .ais-Pagination-link {
    background: none;
    box-shadow: none;
    border: 0;
    padding: 6px 7px;
    min-width: 17px;
    text-align: center;
    color: var(--black);
    margin-left: 0;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    font-size: 16px;
}

.ais-Pagination-item--disabled .ais-Pagination-link {
    background: none;
    box-shadow: none;
    border: 0;
    color: #b6b7d5;
}

.ais-Pagination-item--selected .ais-Pagination-link {
    border: 0;
    box-shadow: none;
    border-bottom: 2px solid var(--orange);
}
