/* Container */


/* Header */
.ui-datepicker-header {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
    padding: 5px;
    text-align: center;
    position: relative;
    height: 30px; /* Fixed height for header */
    line-height: 30px;
    margin-bottom: 0; /* No gap below header */
}

.ui-datepicker-prev,
.ui-datepicker-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 20px;
    height: 20px;
    text-decoration: none;
    color: #333;
}

.ui-datepicker-prev {
    left: 5px;
}

.ui-datepicker-next {
    right: 5px;
}

.ui-datepicker-prev:hover,
.ui-datepicker-next:hover {
    background: #e0e0e0;
    border-radius: 50%;
}

.ui-datepicker-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.ui-datepicker-month,
.ui-datepicker-year {
    display: inline-block;
}

/* Calendar Table */
.ui-datepicker-calendar {
    width: 100%;
    border-collapse: collapse;
    margin: 5px 0 0 0; /* Minimal top margin, no bottom margin */
    padding: 0; /* No extra padding */
}

.ui-datepicker-calendar th {
    font-size: 12px;
    color: #666;
    padding: 5px;
    text-align: center;
}

.ui-datepicker-calendar td {
    padding: 2px;
    text-align: center;
    margin: 0; /* Ensure no extra spacing */
}

.ui-datepicker-calendar a {
    display: block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    border-radius: 50%;
    transition: background 0.2s;
    margin: 0 auto; /* Center with no extra space */
}

/* Day States */
.ui-state-default:hover {
    background: #f0f0f0;
}

.ui-state-active {
    background: #007bff;
    color: #fff !important;
}

.ui-state-highlight {
    background: #fff3cd;
    color: #856404;
}

.ui-priority-secondary {
    color: #999;
}

/* Weekend and Other Month Styling */
.ui-datepicker-week-end a {
    background: #fafafa;
}

.ui-datepicker-other-month a {
    color: #999;
}

/* Current Day */
.ui-datepicker-current-day a {
    background: #007bff;
    color: #fff;
}

/* Today */
.ui-datepicker-today a {
    border: 2px solid #007bff;
    line-height: 26px;
}

/* Icons (arrows only, no text) */
.ui-datepicker-prev span,
.ui-datepicker-next span {
    display: inline-block;
    width: 0;
    height: 0;
    border-style: solid;
    vertical-align: middle;
    text-indent: -9999px; /* Hides text */
}

.ui-datepicker-prev span {
    border-width: 5px 8px 5px 0;
    border-color: transparent #333 transparent transparent;
}

.ui-datepicker-next span {
    border-width: 5px 0 5px 8px;
    border-color: transparent transparent transparent #333;
}

/* Accessibility */
.ui-datepicker a:focus {
    outline: 2px solid #007bff;
    outline-offset: -2px;
}

#ui-datepicker-div {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
    width: 300px;
    display:none; /* Fits content snugly */
    margin: 0; /* Removes any external spacing */
}