.ui-icon,
.ui-widget-content .ui-icon,
.ui-widget-header .ui-icon {
    background-image: none !important;
    text-indent: 0 !important;
}

/* Ensure the jQuery UI datepicker has proper visibility */
.ui-datepicker {
    background-color: #ffffff !important;
    border: 1px solid #ccc !important;
    z-index: 9999 !important;
    padding: 10px !important;
}

/* Make navigation arrows black, visible and clickable - jQuery UI specific */
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    color: transparent !important;
    font-size: 0 !important;
    cursor: pointer !important;
    background-color: #ffffff !important;
    border: 1px solid #ddd !important;
    border-radius: 3px !important;
    width: 30px !important;
    height: 30px !important;
    top: 5px !important;
    background-image: none !important;
    text-indent: 0 !important;
    overflow: visible !important;
}

.ui-datepicker .ui-datepicker-prev {
    left: 5px !important;
}

.ui-datepicker .ui-datepicker-next {
    right: 5px !important;
}

/* Hide the default span content inside prev/next */
.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
    display: none !important;
}

/* Add Font Awesome icons for navigation using ::before */
.ui-datepicker .ui-datepicker-prev::before {
    content: "\f053" !important; /* Font Awesome chevron-left */
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900 !important;
    font-size: 16px !important;
    color: #000000 !important;
    display: block !important;
    line-height: 28px !important;
    text-align: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

.ui-datepicker .ui-datepicker-next::before {
    content: "\f054" !important; /* Font Awesome chevron-right */
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900 !important;
    font-size: 16px !important;
    color: #000000 !important;
    display: block !important;
    line-height: 28px !important;
    text-align: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* Hover state for navigation arrows */
.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
    background-color: #e9ecef !important;
    border-color: #999 !important;
}

/* Style the month/year title */
.ui-datepicker .ui-datepicker-title {
    color: #000000 !important;
    font-weight: bold !important;
    text-align: center !important;
    margin: 0 35px !important;
    line-height: 30px !important;
}

/* Style month and year dropdowns when enabled */
.ui-datepicker .ui-datepicker-month,
.ui-datepicker .ui-datepicker-year {
    color: #000000 !important;
    background-color: #ffffff !important;
    border: 1px solid #ddd !important;
    border-radius: 3px !important;
    padding: 4px 8px !important;
    margin: 0 3px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    cursor: pointer !important;
}

.ui-datepicker .ui-datepicker-month:hover,
.ui-datepicker .ui-datepicker-year:hover {
    border-color: #999 !important;
    background-color: #f8f9fa !important;
}

.ui-datepicker .ui-datepicker-month:focus,
.ui-datepicker .ui-datepicker-year:focus {
    outline: 2px solid #007bff !important;
    outline-offset: 2px !important;
}

/* Adjust title spacing when dropdowns are present */
.ui-datepicker .ui-datepicker-title select {
    margin: 2px !important;
}

/* Ensure all table cells and headers are visible */
.ui-datepicker table {
    width: 100% !important;
    margin: 10px 0 0 0 !important;
}

.ui-datepicker th {
    color: #000000 !important;
    font-weight: bold !important;
    padding: 5px !important;
    text-align: center !important;
}

.ui-datepicker td {
    padding: 2px !important;
}

.ui-datepicker td span,
.ui-datepicker td a {
    display: block !important;
    padding: 5px !important;
    text-align: center !important;
    text-decoration: none !important;
    color: #000000 !important;
}

/* Day hover effect */
.ui-datepicker td a:hover {
    background-color: #e9ecef !important;
    cursor: pointer !important;
}

/* Active/selected date styling */
.ui-datepicker td .ui-state-active {
    background-color: #007bff !important;
    color: #ffffff !important;
}

/* Today's date */
.ui-datepicker td .ui-state-highlight {
    background-color: #ffc107 !important;
    color: #000000 !important;
}

/* Disabled dates */
.ui-datepicker td .ui-state-disabled span {
    color: #999999 !important;
    cursor: not-allowed !important;
}

/* Fix for dark theme - ensure datepicker stays light */
[data-bs-theme="dark"] .ui-datepicker {
    background-color: #ffffff !important;
    color: #000000 !important;
}

[data-bs-theme="dark"] .ui-datepicker table th,
[data-bs-theme="dark"] .ui-datepicker table td {
    color: #000000 !important;
}

[data-bs-theme="dark"] .ui-datepicker .ui-datepicker-title {
    color: #000000 !important;
}

[data-bs-theme="dark"] .ui-datepicker .ui-datepicker-month,
[data-bs-theme="dark"] .ui-datepicker .ui-datepicker-year {
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* ===== BOOTSTRAP DATEPICKER STYLES (keep for compatibility) ===== */

/* Ensure Bootstrap datepicker also works if used elsewhere */
.datepicker {
    background-color: #ffffff !important;
    border: 1px solid #ccc;
    z-index: 9999 !important;
}

.datepicker thead tr:first-child th.prev,
.datepicker thead tr:first-child th.next {
    color: transparent !important;
    font-size: 0 !important;
    font-weight: bold !important;
    cursor: pointer !important;
    background-color: #ffffff !important;
    visibility: visible !important;
    display: table-cell !important;
    vertical-align: middle !important;
    text-align: center !important;
    background-image: none !important;
    width: 30px !important;
    padding: 8px !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
}

.datepicker thead tr:first-child th.prev::before {
    content: "\f053" !important; /* Font Awesome chevron-left */
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900 !important;
    font-size: 18px !important;
    color: #000000 !important;
    display: inline-block;
    line-height: 1 !important;
    text-indent: 0 !important;
    position: relative !important;
    left: 9999px !important;
}

.datepicker thead tr:first-child th.next::before {
    content: "\f054" !important; /* Font Awesome chevron-right */
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900 !important;
    font-size: 18px !important;
    color: #000000 !important;
    display: inline-block;
    line-height: 1 !important;
    text-indent: 0 !important;
    position: relative !important;
    left: 9999px !important;
}