/*
 * EM5 — wyszukiwarka ofert
 * Warstwa wyłącznie prezentacyjna. Logika formularza, identyfikatory pól,
 * Select2/Typeahead i mechanizm dodatkowych filtrów pozostają bez zmian.
 */

:root {
    --offer-search-ink: #20252b;
    --offer-search-muted: #72777d;
    --offer-search-red: #b92c1b;
    --offer-search-line: #e7e4e1;
    --offer-search-soft: #f7f7f5;
}

.offer-search-shell {
    padding: .85rem 0 1rem;
    border-top: 1px solid #efedeb;
    border-bottom: 1px solid #efedeb;
    background: var(--offer-search-soft);
}

.offer-search-panel {
    padding: 1.15rem 1.25rem 1rem;
    border: 1px solid var(--offer-search-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(32, 37, 43, .035);
}

.offer-search-form .form-group,
.offer-search-form .mb-3 {
    margin-bottom: 0 !important;
}

.offer-search-form .form-label,
.offer-search-form label:not(.form-check-label) {
    margin-bottom: .42rem;
    color: #5f6469;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.2;
}

.offer-search-form .form-control,
.offer-search-form .form-select,
.offer-search-form .select2-container--bootstrap-5 .select2-selection,
.offer-search-form .select2-container--krajee .select2-selection {
    min-height: 46px;
    border: 1px solid #dedbd8 !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
    color: var(--offer-search-ink) !important;
    font-size: .92rem;
}

.offer-search-form .form-control {
    padding: .68rem .85rem;
}

.offer-search-form .select2-container--bootstrap-5 .select2-selection--single,
.offer-search-form .select2-container--krajee .select2-selection--single {
    display: flex;
    align-items: center;
    padding: .58rem 2.35rem .58rem .85rem;
}

.offer-search-form .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered,
.offer-search-form .select2-container--krajee .select2-selection--single .select2-selection__rendered {
    padding: 0 !important;
    color: var(--offer-search-ink) !important;
    font-size: .92rem;
    font-weight: 500;
    line-height: 1.35;
}

.offer-search-form .select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder,
.offer-search-form .select2-container--krajee .select2-selection--single .select2-selection__placeholder,
.offer-search-form .form-control::placeholder {
    color: #8a8e92 !important;
    opacity: 1;
}

.offer-search-form .select2-container--bootstrap-5 .select2-selection__arrow,
.offer-search-form .select2-container--krajee .select2-selection__arrow {
    right: .65rem !important;
    border: 0 !important;
    background-color: transparent !important;
}

.offer-search-form .form-control:focus,
.offer-search-form .select2-container--bootstrap-5.select2-container--focus .select2-selection,
.offer-search-form .select2-container--bootstrap-5.select2-container--open .select2-selection,
.offer-search-form .select2-container--krajee.select2-container--focus .select2-selection,
.offer-search-form .select2-container--krajee.select2-container--open .select2-selection {
    border-color: rgba(185, 44, 27, .55) !important;
    box-shadow: 0 0 0 3px rgba(185, 44, 27, .08) !important;
}

.offer-search-location-popover {
    border-color: var(--offer-search-line) !important;
    border-radius: 12px !important;
    box-shadow: 0 18px 45px rgba(32, 37, 43, .12);
}

.offer-search-location-popover .twitter-typeahead,
.offer-search-location-popover .tt-menu {
    width: 100%;
}

.offer-search-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: .25rem;
    padding-top: .9rem;
    border-top: 1px solid #efedeb;
}

.offer-search-more {
    align-items: center;
    gap: .35rem;
    margin: 0 !important;
    padding: .64rem .4rem !important;
    border: 0 !important;
    color: var(--offer-search-red) !important;
    font-size: .9rem;
    text-decoration: none;
}

.offer-search-more:hover {
    color: #8f2115 !important;
}

.offer-search-submit {
    min-width: 150px;
    margin: 0 !important;
    padding: .72rem 1.35rem !important;
    border-radius: 10px !important;
    font-size: .92rem !important;
}

.offer-search-advanced .collapse.show,
.offer-search-advanced .collapsing {
    margin-top: .9rem;
    padding-top: .25rem;
    border-top: 1px solid #efedeb;
}

.offer-search-advanced .form-check {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .65rem .8rem .65rem 2.15rem;
    border: 1px solid var(--offer-search-line);
    border-radius: 10px;
    background: #faf9f8;
}

.offer-search-advanced .form-check-input {
    margin-top: 0;
}

.offer-list-toolbar {
    align-items: center;
    gap: .9rem 1.2rem;
    padding: .8rem 1rem;
    border: 1px solid #ece9e6;
    border-radius: 12px;
    background: #fff;
    color: #6f7479;
    font-size: .86rem;
}

.offer-list-toolbar > div {
    margin: 0 !important;
}

.offer-list-toolbar select {
    min-height: 32px;
    padding: .25rem 1.8rem .25rem .45rem;
    border-radius: 7px;
    background-color: #f7f7f5 !important;
    color: var(--offer-search-ink);
}

.offer-list-toolbar .offers-count {
    margin-left: auto !important;
    color: #6f7479;
}

.offer-list-toolbar .offers-count span {
    color: var(--offer-search-ink);
}

@media (max-width: 991.98px) {
    .filters-fixed.offer-search-shell,
    .agent-profile-filters.filters-fixed {
        background: #fff !important;
    }

    .filters-fixed .offer-search-panel {
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .offer-search-primary {
        --bs-gutter-y: .75rem;
    }

    .offer-search-actions {
        border-top: 0;
        padding-top: .25rem;
    }

    .offer-search-actions .offer-search-submit {
        min-width: 0;
    }

    .offer-search-advanced .collapse.show,
    .offer-search-advanced .collapsing {
        margin-top: .35rem;
        padding-top: .75rem;
    }
}

@media (max-width: 767.98px) {
    .offer-list-toolbar {
        align-items: stretch;
        padding: .75rem;
        gap: .55rem;
    }

    .offer-list-toolbar .offers-count {
        margin-left: 0 !important;
    }
}
