/* --- Стили для подсказок (популярные теги) --- */
.search-suggestions {
    padding: 0.5rem;
    border-bottom: 1px solid #333;
}

input#blog-ajax-search-input {
    text-transform: none !important;
}

.search-suggestions__title {
    color: #888;
    font-size: 0.8rem;
    margin: 0 0 0.5rem 0.5rem;
    text-transform: uppercase;
}

.search-suggestions__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-suggestions__item a {
    display: block;
    background-color: #333;
    color: #ccc;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.search-suggestions__item a:hover {
    background-color: #8D755E;
    color: #fff;
}


/* --- Основной контейнер --- */
.blog-search-wrapper {
    position: relative;
    width: 80%;
    margin-top: 30px;
    border-top: 1px solid #8d755e;
    padding-bottom: 10px;
}


/* --- Индикатор загрузки --- */
.blog-search-wrapper.loading .blog-search-form__button svg {
    visibility: hidden;
}
.blog-search-wrapper.loading .blog-search-form__button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid rgba(141, 117, 94, 0.3);
    border-top-color: #8D755E;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Стили формы поиска --- */
.blog-search-form {
    display: flex;
    justify-content: space-between;
    border: none;
    border-radius: 0;
    overflow: visible;
    background-color: transparent;
    position: relative;
    transition: none;
}

.blog-search-form:focus-within {
    border-color: transparent;
}

.blog-search-form__input {
    font-family: "TT Fors", sans-serif;
    letter-spacing: 0.02em;
    flex-grow: 1;
    border: none;
    background: none;
    font-size: 24px;
    color: #8D755E;
    outline: none;
    padding: 0;
    padding-top: 24px !important;
    height: auto;
}
.blog-search-form__input::placeholder {
    color: #8D755E;
    opacity: 1;
}

.blog-search-form__button {
    background: none;
    border: none;
    padding: 0 0 0 15px;
    cursor: pointer;
    color: #8D755E;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 30px !important;
    align-items: normal;
}


/* --- Выпадающий контейнер с результатами --- */
.ajax-search-results-container {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* --- Элементы результатов --- */
.search-results-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: #2a2a2a;
}

.search-result-item__thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 1rem;
    flex-shrink: 0;
}

.search-result-item__content {
    display: flex;
    flex-direction: column;
}

.search-result-item__title {
    color: #eee;
    font-size: 1.1rem;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.search-result-item__title strong {
    background: #8D755E;
    color: #fff;
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: normal;
}

.search-result-item__meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 6px;
}

.search-result-item__excerpt {
    color: #aaa;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.search-result-item__excerpt strong {
    color: #eee;
    font-weight: bold;
}

.search-no-results {
    color: #888;
    text-align: center;
    padding: 2rem;
}

/* --- Стили для скроллбара --- */
.ajax-search-results-container::-webkit-scrollbar {
  width: 6px;
}

.ajax-search-results-container::-webkit-scrollbar-track {
  background: #2a2a2a; 
  border-radius: 10px;
}
 
.ajax-search-results-container::-webkit-scrollbar-thumb {
  background-color: #8D755E;
  border-radius: 10px;
  border: 2px solid #2a2a2a;
}

/* --- Медиа-запросы для адаптивности --- */

@media (min-width: 1600px) {
    .blog-search-wrapper {
        margin-top: 40px;
    }
}

/* Стили для мобильных устройств */
@media (max-width: 1280px) {
    .blog-search-wrapper {
        width: 100%;
        margin-top: 30px;
        border-top: 0px solid #8d755e;
    }
}

/* Стили для больших экранов */
@media (min-width: 1280px) {
    .blog-hero__title,
    .blog-hero__text {
        min-height: 120px;
    }
}

