/* ==============================================================================
   ULTRA-STYLISH MODERN DROPDOWN DESIGN SYSTEM
   ============================================================================== */

/* Base Enhanced Select Controls */
select,
.form-select,
select.form-control,
select.form-select-sm,
select.form-control-sm {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #ffffff !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%25232563eb' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 16px 16px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 0.65rem 2.8rem 0.65rem 1.1rem !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    color: #0f172a !important;
    line-height: 1.5 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03), inset 0 1px 2px rgba(255, 255, 255, 0.6) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
}

/* Hover State */
select:hover,
.form-select:hover,
select.form-control:hover {
    border-color: #3b82f6 !important;
    background-color: #f8fafc !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08) !important;
}

/* Focus State */
select:focus,
.form-select:focus,
select.form-control:focus {
    border-color: #2563eb !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18), 0 8px 20px rgba(37, 99, 235, 0.1) !important;
    outline: 0 !important;
}

/* Options Styling for Browsers Supporting Option Customization */
select option,
.form-select option {
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: #0f172a !important;
    background-color: #ffffff !important;
}

select option:checked,
.form-select option:checked {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
    font-weight: 600 !important;
}

/* ==============================================================================
   CUSTOM JS ULTRA DROPDOWN ENHANCER COMPONENT
   ============================================================================== */

.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #0f172a;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.custom-select-trigger:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18), 0 8px 20px rgba(37, 99, 235, 0.1);
}

.custom-select-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    fill: none;
    stroke: #2563eb;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.custom-select-wrapper.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-options-menu {
    position: absolute;
    display: block;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    max-height: 260px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 6px;
}

.custom-select-wrapper.open .custom-options-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.custom-option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 0.92rem;
    font-weight: 500;
    color: #334155;
    border-radius: 8px;
    transition: all 0.15s ease;
    cursor: pointer;
    margin-bottom: 2px;
}

.custom-option-item:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

.custom-option-item.selected {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.custom-option-item.selected::after {
    content: "✓";
    font-weight: bold;
    color: #2563eb;
    margin-left: 8px;
}

/* Custom Scrollbar for Dropdown Menu */
.custom-options-menu::-webkit-scrollbar {
    width: 6px;
}
.custom-options-menu::-webkit-scrollbar-track {
    background: transparent;
}
.custom-options-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.custom-options-menu::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
