/* ============================================
   CUSTOM DROPDOWN & DATE PICKER STYLES
   ============================================ */

/* Custom Dropdown Container */
.custom-dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Dropdown Toggle Button */
.dropdown-toggle {
    width: 100%;
    padding: 12px 40px 12px 16px;
    font-size: 15px;
    font-weight: 500;
    border: 2px solid #e0e7ff;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-toggle:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dropdown-toggle.active {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.toggle-text {
    flex: 1;
    text-align: left;
    color: #1f2937;
}

.toggle-text.has-selection {
    font-weight: 600;
}

.toggle-arrow {
    font-size: 12px;
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.dropdown-toggle.active .toggle-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background-color: #ffffff;
    border: 1px solid #e0e7ff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.dropdown-menu.show {
    display: block;
}

/* Dropdown Item */
.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 10px;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
}

/* Checkbox */
.dropdown-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0073aa;
}

/* Checkbox Label */
.checkbox-label {
    flex: 1;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    user-select: none;
    display: flex;
    align-items: center;
}

.checkbox-label:hover {
    color: #1f2937;
}

/* ============================================
   CUSTOM DATE PICKER STYLES
   ============================================ */

/* Wrapper for the input field to position the icon and picker */
.date-picker-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Month Year Picker Input - Matches Dropdown Toggle */
.month-year-picker {
    width: 100%;
    padding: 12px 40px 12px 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    border: 2px solid #e0e7ff;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2937 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.month-year-picker:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.month-year-picker:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.month-year-picker::-webkit-outer-spin-button,
.month-year-picker::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.month-year-picker::placeholder {
    color: #6b7280 !important;
    font-size: 15px !important;
    font-weight: 400 !important;
}

.month-year-picker::-webkit-input-placeholder {
    color: #6b7280 !important;
    font-size: 15px !important;
    font-weight: 400 !important;
}

.month-year-picker:-moz-placeholder {
    color: #6b7280 !important;
    font-size: 15px !important;
    font-weight: 400 !important;
}

/* Calendar Icon */
.date-picker-wrapper .calendar-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    fill: #667eea;
}

/* The main picker dropdown */
.custom-month-year-picker {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    z-index: 1000;
    background-color: #fff;
    border: 1px solid #e0e7ff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 0;
    display: none;
    width: 100%;
    min-width: 300px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Picker Header with Year Navigation */
.custom-month-year-picker .picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 10px 10px 0 0;
}

.custom-month-year-picker .picker-header button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    color: #667eea;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-month-year-picker .picker-header button:hover {
    background-color: #e0e7ff;
    color: #0073aa;
}

.custom-month-year-picker .picker-header .year-display {
    font-weight: 700;
    font-size: 16px;
    color: #1f2937;
}

/* Month Grid */
.custom-month-year-picker .picker-body {
    padding: 12px 16px;
}

.custom-month-year-picker .month-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.custom-month-year-picker .month-grid button {
    padding: 12px 8px;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
    text-align: center;
}

.custom-month-year-picker .month-grid button:hover {
    background-color: #0073aa;
    color: #ffffff;
    border-color: #0073aa;
    transform: scale(1.05);
}

.custom-month-year-picker .month-grid button.selected {
    background-color: #0073aa;
    color: #ffffff;
    border-color: #0073aa;
}

/* ============================================
   SELECT ALL STYLES
   ============================================ */

.dropdown-item.select-all-item {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
    margin-bottom: 8px;
    background-color: #f9fafb;
}

.dropdown-item.select-all-item .checkbox-label {
    font-weight: 600;
    color: #0073aa;
}

.dropdown-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

.dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}