/* Выпадающие подсказки поиска (assets/javascript/suggest.js) */
.search-form,
.home-search {
    position: relative;
}

.suggest {
    position: absolute;
    z-index: 1060;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: min(68vh, 520px);
    padding: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    text-align: left;
    background: #fff;
    border: 1.5px solid #222228;
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(34, 34, 40, 0.18);
}

.suggest[hidden] {
    display: none;
}

.suggest-heading {
    padding: 10px 12px 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #6b6b78;
}

.suggest-item,
.suggest-all {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    color: #222228;
    text-decoration: none;
    border-radius: 14px;
}

.suggest-item:hover,
.suggest-all:hover,
.suggest-item.is-active,
.suggest-all.is-active {
    color: #222228;
    text-decoration: none;
    background: #F0F1F9;
}

.suggest-pic {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    overflow: hidden;
    background: #F0F1F9 center / 20px no-repeat;
    border-radius: 50%;
}

.suggest-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suggest-books .suggest-pic,
.suggest-collections .suggest-pic {
    border-radius: 6px;
}

.suggest-books .suggest-pic {
    width: 36px;
    height: 54px;
}

.suggest-collections .suggest-pic {
    width: 56px;
    height: 42px;
    border-radius: 8px;
}

.suggest-authors .suggest-pic {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23222228' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='3.6'/%3E%3Cpath d='M4.5 20c.8-4 3.7-6 7.5-6s6.7 2 7.5 6'/%3E%3C/svg%3E");
}

.suggest-genres .suggest-pic,
.suggest-moods .suggest-pic {
    background-color: #E4F6B0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23222228' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5V5h7.5L20 13.5 13.5 20z'/%3E%3Ccircle cx='8.2' cy='8.6' r='1'/%3E%3C/svg%3E");
}

.suggest-body {
    flex: 1;
    min-width: 0;
}

.suggest-title,
.suggest-sub {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggest-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 22px;
}

.suggest-sub {
    font-size: 13px;
    line-height: 18px;
    color: #6b6b78;
}

.suggest mark {
    padding: 0 !important;
    color: inherit;
    background: #E4F6B0 !important;
    border-radius: 3px;
}

.suggest-all {
    justify-content: space-between;
    margin-top: 6px;
    font-size: 15px;
    font-weight: 600;
    border-top: 1px solid #ECECF4;
    border-radius: 0 0 14px 14px;
}

.suggest-all::after {
    content: "→";
    font-weight: 400;
}

.suggest-empty,
.suggest-note {
    display: block;
    padding: 12px;
    font-size: 14px;
    line-height: 20px;
    color: #4a4a55;
}

.suggest-empty strong {
    display: block;
    margin-bottom: 2px;
    font-size: 16px;
    color: #222228;
}

.suggest-note {
    padding-bottom: 0;
    font-size: 13px;
    color: #6b6b78;
}

@media (max-width: 575px) {
    .suggest {
        max-height: 60vh;
        border-radius: 20px;
    }

    .suggest-title {
        font-size: 15px;
    }

    .suggest-item {
        padding: 8px;
    }
}

.suggest-loading {
    padding: 14px 12px;
    font-size: 14px;
    color: #6b6b78;
}
