/* ── Modern filter bar styling for Jazzmin admin ──────────────── */

/* Filter container — force all children to align center */
#change-list-filters > .d-flex {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 14px 18px;
    gap: 10px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    align-items: center !important;
}

/* Reset ALL direct children to strip margin/padding offsets */
#change-list-filters > .d-flex > *,
#changelist-search > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    align-self: center !important;
}

#change-list-filters form,
#changelist-search {
    align-items: center !important;
}

/* ── Select2 containers (Jazzmin wraps filters in select2) ──── */

/* Hide the native select (select2 replaces it) */
#change-list-filters select.admin-filter-select {
    min-width: 140px !important;
}

/* Select2 single-select box */
#change-list-filters .select2-container,
#changelist-search .select2-container {
    min-width: 140px !important;
}

#change-list-filters .select2-container .select2-selection--single,
#changelist-search .select2-container .select2-selection--single,
.select2-container--default .select2-selection--single {
    height: 38px !important;
    border: 1px solid #dde1e6 !important;
    border-radius: 8px !important;
    background: #f8f9fb !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single:hover {
    border-color: #b0bec5 !important;
    background: #fff !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #417690 !important;
    box-shadow: 0 0 0 3px rgba(65, 118, 144, 0.12) !important;
    background: #fff !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1 !important;
    padding: 0 32px 0 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #444 !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #888 !important;
    font-weight: 500 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    right: 8px !important;
    display: flex !important;
    align-items: center !important;
}

/* Select2 dropdown */
.select2-dropdown {
    border-radius: 8px !important;
    border: 1px solid #dde1e6 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    margin-top: 4px !important;
    overflow: hidden !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border-radius: 6px !important;
    border: 1px solid #dde1e6 !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    height: 36px !important;
}

.select2-container--default .select2-results__option {
    padding: 8px 12px !important;
    font-size: 13px !important;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: #417690 !important;
    border-radius: 4px !important;
}

/* ── Search input ───────────────────────────────────────────── */
#change-list-filters input.form-control,
#change-list-filters input[type="text"],
#change-list-filters #searchbar,
#changelist-search input.form-control,
#changelist-search #searchbar {
    height: 38px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    background: #f8f9fb !important;
    border: 1px solid #dde1e6 !important;
    border-radius: 8px !important;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s !important;
    min-width: 200px !important;
    box-sizing: border-box !important;
    line-height: 38px !important;
    margin: 0 !important;
    vertical-align: middle !important;
    align-self: center !important;
}

#change-list-filters input.form-control:focus,
#change-list-filters #searchbar:focus,
#changelist-search input.form-control:focus,
#changelist-search #searchbar:focus {
    border-color: #417690 !important;
    box-shadow: 0 0 0 3px rgba(65, 118, 144, 0.12) !important;
    background: #fff !important;
    outline: none !important;
}

/* ── Search / Submit button ─────────────────────────────────── */
#change-list-filters button[type="submit"],
#change-list-filters .btn-primary,
#changelist-search button[type="submit"],
#changelist-search .btn-primary {
    height: 38px !important;
    padding: 0 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: none !important;
    background: linear-gradient(135deg, #417690, #2c5364) !important;
    color: #fff !important;
    cursor: pointer !important;
    transition: opacity 0.2s, box-shadow 0.2s !important;
    white-space: nowrap !important;
    line-height: 38px !important;
    box-sizing: border-box !important;
}

#change-list-filters button[type="submit"]:hover,
#changelist-search button[type="submit"]:hover {
    opacity: 0.9 !important;
    box-shadow: 0 2px 8px rgba(65, 118, 144, 0.3) !important;
}

/* ── Result count ───────────────────────────────────────────── */
#change-list-filters .small.quiet {
    font-size: 12px !important;
    color: #8899a6 !important;
    padding: 0 4px !important;
    align-self: center !important;
}

/* ── Actions bar (Go button + action select) ────────────────── */
.change-list-actions select,
.actions select {
    height: 36px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    border: 1px solid #dde1e6 !important;
    border-radius: 8px !important;
    background: #f8f9fb !important;
    cursor: pointer !important;
}

.change-list-actions .btn,
.actions .btn {
    height: 36px !important;
    padding: 0 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    line-height: 36px !important;
}

/* ── Object tools (Add button) ──────────────────────────────── */
.object-tools .btn,
a.addlink {
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}

/* ── Table styling ──────────────────────────────────────────── */
#result_list table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

#result_list th {
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    color: #5f6b7a !important;
    padding: 12px 16px !important;
    border-bottom: 2px solid #e5e5e5 !important;
}

#result_list td {
    padding: 10px 16px !important;
    font-size: 13px !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

#result_list tr:hover td {
    background: #f8fafb !important;
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination .page-link {
    border-radius: 6px !important;
    margin: 0 2px !important;
    font-size: 13px !important;
}
