/*
 * jQuery UI datepicker – InterBay Select theme.
 * Self-hosted so it satisfies the site CSP (style-src 'self'); the previous
 * ajax.googleapis.com theme was blocked by CSP and the calendar rendered unstyled.
 * Only the datepicker widget is used from jQuery UI, so only it is styled here.
 */
.ui-helper-hidden-accessible {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0; margin: -1px; padding: 0;
}

.ui-datepicker {
    display: none;
    width: 300px;
    max-width: calc(100vw - 32px);
    padding: 12px;
    background: #ffffff;
    border: 1px solid #d9d8d4;
    border-top: 3px solid #83bb26;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(37, 37, 37, 0.18);
    font-family: inherit;
    font-size: 14px;
    color: #252525;
    z-index: 1050 !important; /* above form labels/headings and sticky header content */
}

/* Header: prev / month + year / next */
.ui-datepicker .ui-datepicker-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 36px 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid #f3f2ef;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    position: absolute;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0; /* hide "Prev"/"Next" text, chevron drawn below */
    color: transparent;
    text-decoration: none;
    transition: background-color .15s ease;
}
.ui-datepicker .ui-datepicker-prev { left: 0; }
.ui-datepicker .ui-datepicker-next { right: 0; }
.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover { background: #f3f2ef; }

.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span { display: none; }

.ui-datepicker .ui-datepicker-prev::before,
.ui-datepicker .ui-datepicker-next::before {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 9px; height: 9px;
    border-top: 2px solid #4a4a49;
    border-left: 2px solid #4a4a49;
}
.ui-datepicker .ui-datepicker-prev::before { transform: translate(-30%, -50%) rotate(-45deg); }
.ui-datepicker .ui-datepicker-next::before { transform: translate(-70%, -50%) rotate(135deg); }

.ui-datepicker .ui-state-disabled.ui-datepicker-prev,
.ui-datepicker .ui-state-disabled.ui-datepicker-next { opacity: .3; cursor: default; }

.ui-datepicker .ui-datepicker-title {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 0;
    line-height: 30px;
    font-weight: 600;
}

.ui-datepicker .ui-datepicker-title select {
    height: 30px;
    padding: 0 24px 0 8px;
    border: 1px solid #d9d8d4;
    border-radius: 4px;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%234a4a49' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 8px center;
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    font-size: 14px;
    color: #252525;
    cursor: pointer;
}
.ui-datepicker .ui-datepicker-title select:focus {
    outline: none;
    border-color: #83bb26;
    box-shadow: 0 0 0 2px rgba(131, 187, 38, .25);
}

/* Day grid */
.ui-datepicker table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 2px;
    table-layout: fixed;
    font-size: 14px;
}

.ui-datepicker th {
    padding: 6px 0;
    border: 0;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #4a4a49;
    text-transform: uppercase;
}

.ui-datepicker td {
    padding: 0;
    border: 0;
    text-align: center;
}

.ui-datepicker td a,
.ui-datepicker td span {
    display: block;
    height: 34px;
    line-height: 34px;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    color: #252525;
    transition: background-color .15s ease, color .15s ease;
}

.ui-datepicker td a:hover { background: #f3f2ef; color: #252525; }

.ui-datepicker td.ui-datepicker-today a {
    box-shadow: inset 0 0 0 1px #83bb26;
    font-weight: 600;
}

.ui-datepicker td a.ui-state-active,
.ui-datepicker td.ui-datepicker-current-day a {
    background: #83bb26;
    color: #ffffff;
    font-weight: 600;
}
.ui-datepicker td a.ui-state-active:hover { background: #4f7017; color: #ffffff; }

.ui-datepicker td.ui-datepicker-other-month a,
.ui-datepicker td.ui-state-disabled span { color: #b5b4b0; }
.ui-datepicker td.ui-state-disabled { opacity: 1; cursor: default; }

/* Button pane (if showButtonPanel is ever enabled) */
.ui-datepicker .ui-datepicker-buttonpane {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f3f2ef;
}
.ui-datepicker .ui-datepicker-buttonpane button {
    padding: 4px 12px;
    border: 1px solid #83bb26;
    border-radius: 4px;
    background: #ffffff;
    color: #4f7017;
    font: inherit;
    cursor: pointer;
}
