/* =============================================
   Site-wide jQuery UI datepicker skin
   =============================================
   Extracted from css/listing.css (21/07/2026) so the updated picker UI —
   themed calendar, month/year pill dropdowns, Clear/Close button panel —
   applies everywhere the picker is used: home quick search, act page
   enquiry form, header search and the listing pages. Loaded via
   standard_css (config.php) after jquery-ui.min.css so it overrides it.
   ============================================= */

/* =============================================
   Date Picker (jQuery UI) — themed to match
   the listing redesign
   ============================================= */

/* Must sit above the mobile filter overlay (z-index 10000001) */
#ui-datepicker-div {
    z-index: 10000002 !important;
}

.ui-datepicker {
    width: 300px;
    box-sizing: border-box;
    padding: 14px;
    background: #fff;
    border: 1px solid #e8ebf0;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.10);
    font-family: 'Source Sans Pro', sans-serif;
}

.ui-datepicker .ui-datepicker-header {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0 0 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #1a1a1a;
}

/* Prev / next month arrows */
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    top: 0;
    width: 30px;
    height: 30px;
    border: 1px solid #e0e4ea;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
}

.ui-datepicker .ui-datepicker-prev {
    left: 0;
}

.ui-datepicker .ui-datepicker-next {
    right: 0;
}

.ui-datepicker .ui-datepicker-prev.ui-state-hover,
.ui-datepicker .ui-datepicker-next.ui-state-hover {
    top: 0;
    background: #f0f7ff;
    border: 1px solid #0693e3;
}

.ui-datepicker .ui-datepicker-prev.ui-state-hover {
    left: 0;
}

.ui-datepicker .ui-datepicker-next.ui-state-hover {
    right: 0;
}

.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
    margin-top: -5px;
    margin-left: -5px;
    width: 10px;
    height: 10px;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 7px 10px !important;
}

.ui-datepicker .ui-datepicker-prev span {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='12' viewBox='0 0 8 12'%3E%3Cpath d='M6.5 1l-5 5 5 5' stroke='%23555' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

.ui-datepicker .ui-datepicker-next span {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='12' viewBox='0 0 8 12'%3E%3Cpath d='M1.5 1l5 5-5 5' stroke='%23555' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

/* Month / year dropdowns — pill style */
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year {
    border: 1.5px solid #d0d5dd;
    border-radius: 16px;
    padding: 4px 10px;
    margin: 0 2px;
    width: auto;
    background: #fff;
    color: #333;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.ui-datepicker select.ui-datepicker-month:hover,
.ui-datepicker select.ui-datepicker-year:hover {
    border-color: #0693e3;
}

/* Calendar grid */
.ui-datepicker table.ui-datepicker-calendar {
    margin: 0;
    font-size: 13px;
}

.ui-datepicker th {
    padding: 6px 2px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
}

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

.ui-datepicker td span,
.ui-datepicker td a,
.ui-datepicker td span.ui-state-default,
.ui-datepicker td a.ui-state-default {
    display: block;
    padding: 0;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border: none;
    border-radius: 7px;
    background: #fff;
    color: #444;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.ui-datepicker td a.ui-state-hover {
    background: #f0f7ff;
    color: #0693e3;
}

/* Today */
.ui-datepicker td a.ui-state-highlight {
    box-shadow: inset 0 0 0 1.5px #0693e3;
    background: #fff;
    color: #0693e3;
    font-weight: 600;
}

/* Selected date */
.ui-datepicker td a.ui-state-active {
    background: #0693e3;
    color: #fff;
    font-weight: 600;
    box-shadow: none;
}

/* Past / unselectable days */
.ui-datepicker td.ui-state-disabled span,
.ui-datepicker td.ui-datepicker-unselectable span {
    background: none;
    color: #ccc;
}

/* Datepicker button panel — "Clear" (repurposed Today button, see listing.js)
   and "Close". Styled to match the site's pill buttons. */
.ui-datepicker .ui-datepicker-buttonpane {
    display: flex;
    gap: 10px;
    margin: 8px 4px 4px;
    padding-top: 10px;
    border-top: 1px solid #e8ebf0;
}

.ui-datepicker .ui-datepicker-buttonpane button {
    flex: 1;
    float: none;
    margin: 0;
    padding: 8px 14px;
    border: 1.5px solid #d0d5dd;
    border-radius: 18px;
    background: #fff;
    color: #444;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    opacity: 1;
    transition: all 0.2s ease;
}

.ui-datepicker .ui-datepicker-buttonpane button:hover {
    border-color: #0693e3;
    color: #0693e3;
}
