/**
 * Hero Search - Exact Jobware Style Copy
 * Точная копия поиска с изображения Jobware
 * ВАЖНО: Этот файл должен загружаться ПОСЛЕДНИМ!
 */

/* Сброс всех конфликтующих стилей */
.hero-modern .hero-search-container,
.hero-modern .hero-search-form,
.hero-modern .hero-search-main-row,
.hero-modern .hero-search-input-wrapper,
.hero-modern .hero-search-location-wrapper,
.hero-modern .hero-search-submit-btn {
    all: unset !important;
}

/* Основной контейнер поиска */
.hero-modern .hero-search-container {
    display: block !important;
    max-width: 1200px !important;
    margin: 0 auto 40px !important;
    padding: 0 20px !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Форма поиска */
.hero-modern .hero-search-form {
    display: block !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Основная строка поиска - точная копия Jobware */
.hero-modern .hero-search-main-row {
    display: flex !important;
    align-items: stretch !important;
    background: white !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    height: 48px !important;
    gap: 0 !important;
    flex-direction: row !important;
}

/* Выпадающий список основных категорий - первый элемент */
.hero-modern .hero-search-category-wrapper {
    flex: 1 !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    background: white !important;
    border: none !important;
    border-right: 1px solid #ddd !important;
    padding: 0 16px !important;
    height: 100% !important;
    min-height: 48px !important;
    cursor: pointer !important;
}

/* Выпадающий список подкатегорий - второй элемент */
.hero-modern .hero-search-subcategory-wrapper {
    flex: 1.2 !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    background: white !important;
    border: none !important;
    border-right: 1px solid #ddd !important;
    padding: 0 16px !important;
    height: 100% !important;
    min-height: 48px !important;
}

.hero-modern .hero-search-category-select {
    width: 100% !important;
    border: none !important;
    outline: none !important;
    padding: 4px 30px 4px 0 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #333 !important;
    background: transparent !important;
    height: auto !important;
    line-height: normal !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 2 !important;
}

.hero-modern .hero-search-category-select optgroup {
    font-weight: 600 !important;
    color: #FF6B35 !important;
    background: #f8f9fa !important;
    padding: 8px 0 !important;
}

.hero-modern .hero-search-category-select option {
    font-weight: 400 !important;
    color: #333 !important;
    background: white !important;
    padding: 8px 12px !important;
    text-align: center !important;
}

.hero-modern .hero-category-arrow {
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 12px !important;
    color: #666 !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

/* Поле поиска - третий элемент */
.hero-modern .hero-search-input-wrapper {
    flex: 2 !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    background: white !important;
    border: none !important;
    border-right: 1px solid #ddd !important;
    padding: 0 16px !important;
    height: 100% !important;
    min-height: 48px !important;
}

.hero-modern .hero-search-icon {
    margin-right: 8px !important;
    font-size: 16px !important;
    color: #666 !important;
    flex-shrink: 0 !important;
    position: static !important;
    left: auto !important;
}

.hero-modern .hero-search-input-main {
    width: 100% !important;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #333 !important;
    background: transparent !important;
    height: auto !important;
    line-height: normal !important;
}

.hero-modern .hero-search-input-main::placeholder {
    color: #666 !important;
    font-weight: 400 !important;
    font-size: 14px !important;
}

/* Поле локации - четвертый элемент */
.hero-modern .hero-search-location-wrapper {
    flex: 1.5 !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    background: white !important;
    border: none !important;
    border-right: 1px solid #ddd !important;
    padding: 0 16px !important;
    height: 100% !important;
    min-height: 48px !important;
}

.hero-modern .hero-location-icon {
    margin-right: 8px !important;
    font-size: 16px !important;
    color: #666 !important;
    flex-shrink: 0 !important;
    position: static !important;
    left: auto !important;
}

.hero-modern .hero-search-location-input {
    width: 100% !important;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #333 !important;
    background: transparent !important;
    height: auto !important;
    line-height: normal !important;
}

.hero-modern .hero-search-location-input::placeholder {
    color: #666 !important;
    font-weight: 400 !important;
}

.hero-modern .hero-location-clear {
    margin-left: 8px !important;
    background: none !important;
    border: none !important;
    color: #999 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    padding: 2px !important;
    display: none !important;
    flex-shrink: 0 !important;
    position: static !important;
    right: auto !important;
}

.hero-modern .hero-location-clear:hover {
    color: #FF6B35 !important;
}

/* Кнопка поиска - правая часть */
.hero-modern .hero-search-submit-btn {
    background: #FF6B35 !important;
    color: white !important;
    border: none !important;
    padding: 0 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    flex-shrink: 0 !important;
    min-width: 120px !important;
    height: 100% !important;
    min-height: 48px !important;
    border-radius: 0 !important;
    transform: none !important;
    box-shadow: none !important;
}

.hero-modern .hero-search-submit-btn:hover {
    background: #e55a2b !important;
    transform: none !important;
    box-shadow: none !important;
}

.hero-modern .hero-search-submit-btn:active {
    background: #d14d20 !important;
    transform: none !important;
}

.hero-modern .hero-search-btn-text {
    font-weight: 600 !important;
}

/* Фильтры (скрываем если есть) */
.hero-search-filters-toggle {
    display: none !important;
}

.hero-search-filters-panel {
    display: none !important;
}

/* ============================================
   НАТИВНЫЙ МОБИЛЬНЫЙ ПОИСК - MOBILE-FIRST
   ============================================ */

@media (max-width: 768px) {
    /* Компактный заголовок - одна строка */
    .hero-modern .hero-title-modern {
        font-size: 1.4rem !important;
        line-height: 1.2 !important;
        margin-bottom: 16px !important;
        font-weight: 500 !important;
        text-align: center !important;
    }
    
    /* Контейнер поиска - нативный мобильный стиль */
    .hero-modern .hero-search-container {
        padding: 0 12px !important;
        margin-bottom: 20px !important;
        max-width: 100% !important;
    }
    
    /* Основная форма - единый search-компонент */
    .hero-modern .hero-search-main-row {
        flex-direction: column !important;
        height: auto !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        overflow: hidden !important;
        background: transparent !important;
        border: none !important;
        gap: 8px !important;
    }
    
    /* Порядок полей - mobile ergonomic */
    .hero-modern .hero-search-category-wrapper {
        order: 1 !important;
    }
    
    .hero-modern .hero-search-subcategory-wrapper {
        order: 2 !important;
    }
    
    .hero-modern .hero-search-input-wrapper {
        order: 3 !important;
    }
    
    .hero-modern .hero-search-location-wrapper {
        order: 4 !important;
    }
    
    .hero-modern .hero-search-submit-btn {
        order: 5 !important;
    }
    
    /* Все поля одинаковой высоты - единообразие */
    .hero-modern .hero-search-category-wrapper,
    .hero-modern .hero-search-subcategory-wrapper,
    .hero-modern .hero-search-input-wrapper,
    .hero-modern .hero-search-location-wrapper {
        flex: none !important;
        border: none !important;
        border-radius: 8px !important;
        background: white !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
        padding: 14px 16px !important;
        min-height: 56px !important;
        height: 56px !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        margin-bottom: 0 !important;
    }
    
    /* Иконки одинакового размера для единообразия */
    .hero-modern .hero-search-icon,
    .hero-modern .hero-location-icon {
        font-size: 16px !important;
        color: #FF6B35 !important;
        margin-right: 10px !important;
        flex-shrink: 0 !important;
    }
    
    /* Иконки для категорий - тот же размер */
    .hero-modern .hero-search-category-wrapper::before {
        content: '⚙️' !important;
        font-size: 16px !important;
        margin-right: 10px !important;
        flex-shrink: 0 !important;
    }
    
    .hero-modern .hero-search-subcategory-wrapper::before {
        content: '📂' !important;
        font-size: 16px !important;
        margin-right: 10px !important;
        flex-shrink: 0 !important;
    }
    
    /* Все инпуты одинакового размера шрифта */
    .hero-modern .hero-search-input-main,
    .hero-modern .hero-search-location-input {
        font-size: 15px !important;
        line-height: 1.3 !important;
        font-weight: 400 !important;
        color: #333 !important;
        border: none !important;
        outline: none !important;
        background: transparent !important;
        width: 100% !important;
        padding: 0 !important;
    }
    
    .hero-modern .hero-search-input-main::placeholder,
    .hero-modern .hero-search-location-input::placeholder {
        color: #999 !important;
        font-weight: 400 !important;
    }
    
    /* Select тот же размер шрифта */
    .hero-modern .hero-search-category-select {
        font-size: 15px !important;
        line-height: 1.3 !important;
        font-weight: 400 !important;
        color: #333 !important;
        border: none !important;
        outline: none !important;
        background: transparent !important;
        width: 100% !important;
        padding: 0 20px 0 0 !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        cursor: pointer !important;
    }
    
    /* Скрываем стандартную стрелку */
    .hero-modern .hero-category-arrow {
        display: none !important;
    }
    
    /* Стрелки одинакового размера */
    .hero-modern .hero-search-category-wrapper::after,
    .hero-modern .hero-search-subcategory-wrapper::after {
        content: '▾' !important;
        position: absolute !important;
        right: 14px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        font-size: 10px !important;
        color: #bbb !important;
        pointer-events: none !important;
    }
    
    /* CTA кнопка - визуально объединена с формой */
    .hero-modern .hero-search-submit-btn {
        min-width: auto !important;
        width: 100% !important;
        padding: 0 !important;
        border-radius: 8px !important;
        min-height: 44px !important;
        height: 44px !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
        background: #FF6B35 !important;
        color: white !important;
        border: none !important;
        box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3) !important;
        transition: all 0.2s ease !important;
        cursor: pointer !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 6px !important;
        margin-top: 8px !important;
        line-height: 1 !important;
    }
    
    .hero-modern .hero-search-submit-btn:active {
        background: #e55a2b !important;
        transform: scale(0.98) !important;
        box-shadow: 0 1px 4px rgba(255, 107, 53, 0.4) !important;
    }
    
    /* Иконка в кнопке */
    .hero-modern .hero-search-submit-btn .bi-search,
    .hero-modern .hero-search-submit-btn i {
        font-size: 14px !important;
        line-height: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
    }
    
    /* Текст в кнопке */
    .hero-modern .hero-search-submit-btn .hero-search-btn-text,
    .hero-modern .hero-search-submit-btn span {
        line-height: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Экраны 360-414px - всё помещается без скролла */
@media (max-width: 414px) {
    .hero-modern .hero-title-modern {
        font-size: 1.3rem !important;
        margin-bottom: 14px !important;
    }
    
    .hero-modern .hero-search-container {
        padding: 0 10px !important;
        margin-bottom: 18px !important;
    }
    
    .hero-modern .hero-search-main-row {
        gap: 6px !important;
    }
    
    /* Все поля одинаковой высоты на маленьких экранах */
    .hero-modern .hero-search-category-wrapper,
    .hero-modern .hero-search-subcategory-wrapper,
    .hero-modern .hero-search-input-wrapper,
    .hero-modern .hero-search-location-wrapper {
        padding: 10px 12px !important;
        min-height: 42px !important;
        height: 42px !important;
        border-radius: 7px !important;
    }
    
    .hero-modern .hero-search-submit-btn {
        padding: 10px 14px !important;
        min-height: 42px !important;
        height: 42px !important;
        font-size: 14px !important;
        border-radius: 7px !important;
        margin-top: 6px !important;
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .hero-modern .hero-search-input-main,
    .hero-modern .hero-search-location-input {
        font-size: 14px !important;
    }
    
    .hero-modern .hero-search-category-select {
        font-size: 13px !important;
    }
    
    .hero-modern .hero-search-icon {
        font-size: 15px !important;
        margin-right: 7px !important;
    }
    
    .hero-modern .hero-location-icon {
        font-size: 13px !important;
        margin-right: 7px !important;
    }
    
    .hero-modern .hero-search-category-wrapper::before,
    .hero-modern .hero-search-subcategory-wrapper::before {
        font-size: 13px !important;
        margin-right: 7px !important;
    }
    
    .hero-modern .hero-search-category-wrapper::after,
    .hero-modern .hero-search-subcategory-wrapper::after {
        right: 10px !important;
        font-size: 9px !important;
    }
}


/* ============================================
   КРИТИЧЕСКИЕ ИСПРАВЛЕНИЯ ДЛЯ МОБИЛЬНОЙ КНОПКИ
   Максимальная специфичность - ДОЛЖЕН БЫТЬ ПОСЛЕДНИМ!
   ============================================ */

@media (max-width: 768px) {
    /* Принудительно фиксируем размер кнопки */
    .hero-modern .hero-search-submit-btn,
    section.hero-modern .hero-search-submit-btn,
    .hero-search-form .hero-search-submit-btn,
    #home-search-form .hero-search-submit-btn,
    body .hero-modern .hero-search-submit-btn,
    html body .hero-modern .hero-search-submit-btn {
        min-height: 48px !important;
        max-height: 48px !important;
        height: 48px !important;
        padding: 0 20px !important;
        font-size: 15px !important;
        line-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: row !important;
        gap: 8px !important;
        border-radius: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Иконка в кнопке */
    .hero-modern .hero-search-submit-btn i,
    section.hero-modern .hero-search-submit-btn i,
    body .hero-modern .hero-search-submit-btn i {
        font-size: 16px !important;
        line-height: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        height: auto !important;
    }
    
    /* Текст в кнопке */
    .hero-modern .hero-search-submit-btn .hero-search-btn-text,
    .hero-modern .hero-search-submit-btn span,
    section.hero-modern .hero-search-submit-btn span,
    body .hero-modern .hero-search-submit-btn span {
        font-size: 15px !important;
        line-height: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

@media (max-width: 480px) {
    .hero-modern .hero-search-submit-btn,
    section.hero-modern .hero-search-submit-btn,
    body .hero-modern .hero-search-submit-btn {
        min-height: 44px !important;
        max-height: 44px !important;
        height: 44px !important;
        padding: 0 16px !important;
        font-size: 14px !important;
        line-height: 44px !important;
    }
    
    .hero-modern .hero-search-submit-btn i,
    body .hero-modern .hero-search-submit-btn i {
        font-size: 14px !important;
    }
    
    .hero-modern .hero-search-submit-btn span,
    body .hero-modern .hero-search-submit-btn span {
        font-size: 14px !important;
    }
}
