/**
 * Global CSS - Cross-browser compatibility styles
 * Applied across the entire ShareMed project
 */

/* Safari-compatible select styling - ensures consistent appearance across all browsers */
select,
.form-control select,
select.form-control,
select.custom-select,
.select2-selection,
select[class*="select"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px !important;
    cursor: pointer;
    min-height: 42px !important;
    line-height: 1.6 !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

/* Ensure proper styling for disabled selects */
select:disabled,
select.form-control:disabled,
.form-control select:disabled {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    cursor: not-allowed;
    opacity: 0.6;
}

/* Note: Focus styles and additional select styling should be defined in individual templates or component styles */

/* Override for select2 dropdowns to prevent double arrows */
.select2-container--default .select2-selection--single {
    background-image: none !important;
    padding-right: 12px !important;
}

/* Ensure native select arrow is hidden in all browsers */
select::-ms-expand {
    display: none;
}
