/*
Global dropdown indicators for DMAC Church MemberCare Connect.

This file makes dropdown-capable controls visibly look like dropdowns across:
- Django <select> fields
- Bootstrap .form-select controls
- Hard-coded template <select> controls
- Bootstrap dropdown buttons and links
*/

select:not([multiple]),
.form-select:not([multiple]),
select.form-control:not([multiple]) {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23495057' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 6l4 4 4-4'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.9rem center !important;
    background-size: 1rem 1rem !important;

    padding-right: 2.75rem !important;
    cursor: pointer;
}

select[multiple],
.form-select[multiple],
select[size]:not([size="1"]) {
    background-image: none !important;
    padding-right: 0.75rem !important;
    cursor: default;
}

select:disabled,
.form-select:disabled {
    cursor: not-allowed;
    opacity: 0.75;
}

.dropdown-toggle::after,
button[data-bs-toggle="dropdown"]::after,
a[data-bs-toggle="dropdown"]::after,
[data-toggle="dropdown"]::after {
    display: inline-block !important;
    margin-left: 0.5rem !important;
    vertical-align: 0.15em !important;
    content: "" !important;
    border-top: 0.35em solid currentColor !important;
    border-right: 0.35em solid transparent !important;
    border-bottom: 0 !important;
    border-left: 0.35em solid transparent !important;
}

.dropdown-toggle,
button[data-bs-toggle="dropdown"],
a[data-bs-toggle="dropdown"],
[data-toggle="dropdown"] {
    cursor: pointer;
}

select:focus,
.form-select:focus,
.dropdown-toggle:focus,
button[data-bs-toggle="dropdown"]:focus,
a[data-bs-toggle="dropdown"]:focus {
    outline: 2px solid rgba(13, 110, 253, 0.35);
    outline-offset: 2px;
}
