/* Custom styles to make bootstrap-select look like Bootstrap 5 form-select */

/* Override bootstrap-select default width */
.bootstrap-select {
    width: 100% !important;
}

/* Style the dropdown toggle to look like form-select */
.bootstrap-select .dropdown-toggle {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--bs-body-bg);
    height: 56px;
}

/* Hover state */
.bootstrap-select .dropdown-toggle:hover {
    border-color: #86b7fe;
}

/* Focus state */
.bootstrap-select .dropdown-toggle:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Remove the default bootstrap-select arrow */
.bootstrap-select .dropdown-toggle:after {
    display: none !important;
}

/* Style for placeholder text */
.bootstrap-select .dropdown-toggle.bs-placeholder {
    color: #6c757d !important;
}

/* Style for selected text */
.bootstrap-select .dropdown-toggle .filter-option {
    color: #212529;
    text-align: left;
}

/* Style for multiple selections */
.bootstrap-select .dropdown-toggle .filter-option-inner-inner {
    color: #212529;
    padding-top: 7px;
    color: var(--bs-body-color);
}

/* Disabled state */
.bootstrap-select.disabled .dropdown-toggle,
.bootstrap-select .dropdown-toggle:disabled {
    background-color: #e9ecef;
    opacity: 0.65;
    cursor: not-allowed;
}

/* Invalid state */
.bootstrap-select.is-invalid .dropdown-toggle {
    border-color: #dc3545;
}

.bootstrap-select.is-invalid .dropdown-toggle:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Valid state */
.bootstrap-select.is-valid .dropdown-toggle {
    border-color: #198754;
}

.bootstrap-select.is-valid .dropdown-toggle:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* Size variations */
.bootstrap-select.form-select-sm .dropdown-toggle {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

.bootstrap-select.form-select-lg .dropdown-toggle {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    border-radius: 0.5rem;
}

/* Multiple selection styling */
.bootstrap-select[multiple] .dropdown-toggle .filter-option {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.bootstrap-select[multiple] .dropdown-toggle .filter-option-inner-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* Selected items in multiple mode */
.bootstrap-select[multiple] .dropdown-toggle .filter-option-inner-inner .badge {
    background-color: #0d6efd;
    color: white;
    font-size: 0.75em;
    padding: 0.25em 0.5em;
    border-radius: 0.25rem;
    margin: 0.125rem;
}

/* Dropdown menu styling */
.bootstrap-select .dropdown-menu {
    border: 1px solid rgba(0, 0, 0, 0.175);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Search box styling */
.bootstrap-select .bs-searchbox .form-control {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
}

.bootstrap-select .bs-searchbox .form-control:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Actions box styling */
.bootstrap-select .bs-actionsbox .btn {
    border-radius: 0.375rem;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

/* Remove form-control class conflicts */
.bootstrap-select.form-control {
    padding: 0;
    border: none;
    height: auto;
    margin-bottom: 0;
}

/* Ensure proper spacing in form groups */
.form-group .bootstrap-select {
    margin-bottom: 0;
}

/* Responsive behavior */
@media (max-width: 576px) {
    .bootstrap-select {
        width: 100% !important;
    }
} 