/**
 * Global Select Dropdown Styling
 * Applied to all select elements across all forms in the application
 */

/* Base styling for ALL select elements */
select.form-control,
select[class*="form-control"],
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23223a66' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding: 10px 40px 10px 15px;
    cursor: pointer;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    color: #495057;
    background-color: #fff;
    height: 50px;
    min-height: 50px;
    width: 100%;
    display: block;
    line-height: 1.5;
    box-sizing: border-box;
}

/* Hover state for all selects */
select.form-control:hover,
select[class*="form-control"]:hover,
select:hover {
    border-color: #223a66;
    box-shadow: 0 0 0 3px rgba(34, 58, 102, 0.1);
}

/* Focus state for all selects */
select.form-control:focus,
select[class*="form-control"]:focus,
select:focus {
    border-color: #223a66;
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 58, 102, 0.15);
    background-color: #fff;
}

/* Active state for all selects */
select.form-control:active,
select[class*="form-control"]:active,
select:active {
    border-color: #223a66;
}

/* Ensure options are visible - native browser styling */
select.form-control option,
select[class*="form-control"] option,
select option {
    padding: 12px 15px;
    background-color: #fff;
    color: #495057;
    font-size: 0.95rem;
    min-height: 40px;
}

select.form-control option:checked,
select[class*="form-control"] option:checked,
select option:checked {
    background-color: #223a66;
    color: #fff;
}

select.form-control option[value=""],
select[class*="form-control"] option[value=""],
select option[value=""] {
    color: #6c757d;
    font-style: italic;
}

/* Custom styling for select in cards */
.card select.form-control,
.card select[class*="form-control"],
.card select,
.vital-card select.form-control,
.vital-card select[class*="form-control"],
.vital-card select {
    border-color: #dee2e6;
    background-color: #fff;
}

.card select.form-control:focus,
.card select[class*="form-control"]:focus,
.card select:focus,
.vital-card select.form-control:focus,
.vital-card select[class*="form-control"]:focus,
.vital-card select:focus {
    border-color: #223a66;
    background-color: #fff;
}

/* Disabled state for all selects */
select.form-control:disabled,
select[class*="form-control"]:disabled,
select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Fix for Firefox dropdown display */
@-moz-document url-prefix() {
    select.form-control,
    select[class*="form-control"],
    select {
        text-indent: 0.01px;
        text-overflow: '';
    }
}

/* Ensure parent containers don't clip dropdown */
.row {
    overflow: visible;
}

.col-md-4, 
.col-md-6, 
.col-md-12,
.col-lg-4,
.col-lg-6,
.col-lg-12,
.col-sm-4,
.col-sm-6,
.col-sm-12 {
    overflow: visible;
}

/* Ensure cards and form containers don't clip dropdowns */
.card,
.vital-card,
.form-group,
.form-row {
    overflow: visible;
    position: relative;
}

