/* ============================================
   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::-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: 5px;
    z-index: 1000;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
    padding: 0;
    display: none; /* Hidden by default */
    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: 10px;
    background-color: #f7f7f7;
    border-bottom: 1px solid #eee;
    border-radius: 5px 5px 0 0;
}

.custom-month-year-picker .picker-header button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    color: #555;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.custom-month-year-picker .picker-header button:hover {
    background-color: #e0e0e0;
}

/* Disabled year navigation button */
.custom-month-year-picker .picker-header button.disabled,
.custom-month-year-picker .picker-header button:disabled {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.custom-month-year-picker .picker-header button.disabled:hover,
.custom-month-year-picker .picker-header button:disabled:hover {
    background-color: transparent;
}

.custom-month-year-picker .picker-header .year-display {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

/* Month Grid */
.custom-month-year-picker .picker-body {
    padding: 10px;
}

.custom-month-year-picker .month-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.custom-month-year-picker .month-grid button {
    padding: 15px 5px;
    border: 1px solid #eee;
    background-color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
    text-align: center;
}

.custom-month-year-picker .month-grid button:hover {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
    transform: scale(1.05);
}

.custom-month-year-picker .month-grid button.selected {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Disabled month buttons */
.custom-month-year-picker .month-grid button.disabled,
.custom-month-year-picker .month-grid button:disabled {
    background-color: #f5f5f5;
    color: #ccc;
    border-color: #e8e8e8;
    cursor: not-allowed;
    opacity: 0.5;
}

.custom-month-year-picker .month-grid button.disabled:hover,
.custom-month-year-picker .month-grid button:disabled:hover {
    background-color: #f5f5f5;
    color: #ccc;
    border-color: #e8e8e8;
    transform: none;
}