/* ========== ЕДИНЫЙ СТИЛЬ ПОИСКА ========== */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 12px 120px 12px 20px;
    border: 1px solid #dbdbdb;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    background: #fafafa;
}

.search-input:focus {
    border-color: #0095f6;
    background: white;
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #0095f6;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    white-space: nowrap;
}

.search-btn:hover {
    background: #0081d6;
}

.search-btn:active {
    transform: translateY(-50%) scale(0.96);
}

.search-btn svg {
    width: 18px;
    height: 18px;
    stroke: white;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .search-input {
        padding: 10px 100px 10px 16px;
        font-size: 14px;
    }
    .search-btn {
        padding: 6px 14px;
        font-size: 13px;
    }
    .search-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* ========== SEARCH SECTIONS ========== */
.search-section {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid #dbdbdb;
    margin-bottom: 30px;
}

.search-section .search-form {
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 1025px) {
    .search-section {
        display: block;
    }
}

@media (max-width: 1024px) {
    .search-section {
        display: none !important;
    }
}

/* ========== ОВЕРЛЕЙ ЗАГРУЗКИ ПОИСКА ========== */
/* Показывается при отправке формы поиска и крутится, пока грузится новая страница */
.search-submit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.65);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.search-submit-overlay.active {
    display: flex;
}

.search-submit-spinner {
    width: 54px;
    height: 54px;
    border: 5px solid rgba(0, 149, 246, 0.2);
    border-top-color: #0095f6;
    border-radius: 50%;
    animation: search-submit-spin 0.8s linear infinite;
}

@keyframes search-submit-spin {
    to { transform: rotate(360deg); }
}

/* Тёмная тема — более тёмная подложка */
body.dark .search-submit-overlay {
    background: rgba(15, 15, 22, 0.65);
}

@media (prefers-reduced-motion: reduce) {
    .search-submit-spinner {
        animation-duration: 1.6s;
    }
}