/* Исправления для поиска в хедере */

/* Десктопная версия - улучшенный поиск */
@media (min-width: 992px) {
    .header-search {
        position: relative;
        display: flex;
        align-items: center;
        height: 56px;
        margin: -4px 0;
        overflow: visible;
        width: 350px; /* Увеличиваем ширину */
        margin-left: auto; /* Прижимаем вправо */
    }

    .header-search-form {
        position: relative;
        width: 100%;
        display: flex;
        align-items: center;
    }

    .header-search-input {
        width: 100%;
        height: 45px;
        border: 1px solid #dce1e7;
        border-radius: 8px !important;
        padding: 0 50px 0 16px; /* Увеличиваем правый отступ для кнопки */
        font-size: 14px;
        background-color: #f8f9fa;
        outline: none;
        transition: border-color 0.2s ease, background-color 0.2s ease;
        box-sizing: border-box;
    }

    .header-search-input:focus {
        border-color: #4263eb;
        background-color: #fff;
        box-shadow: 0 0 0 0.2rem rgba(66, 99, 235, 0.15);
    }

    .header-search-input::placeholder {
        color: #6c757d;
    }

    .header-search-btn {
        background: none;
        border: none;
        color: #4263eb;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 35px;
        border-radius: 4px;
        cursor: pointer;
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        transition: color 0.2s ease;
    }

    .header-search-btn:hover {
        color: #3651d4;
        background-color: rgba(66, 99, 235, 0.1);
    }

    .header-search-btn svg {
        width: 20px;
        height: 20px;
        display: block;
    }

    .header-search-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
        max-height: 400px;
        overflow-y: auto;
        z-index: 2147483647;
        display: none;
        margin-top: 5px;
    }

    .header-search-dropdown.show {
        display: block !important;
        visibility: visible !important;
    }
}

/* Мобильная версия остается без изменений */
@media (max-width: 991px) {
    .header-search {
        display: none;
    }
}

/* Планшетная версия - скрываем поиск в хедере */
@media (max-width: 768px) {
    .header-search {
        display: none;
    }
}