/**
 * Villa Taradis — custom datepicker styles
 *
 * Paired with assets/js/villa-datepicker.js. Used in the booking modal
 * across every page (the MotoPress kbwood popup is NOT available there
 * because MPHB only enqueues its scripts on single-room / checkout pages).
 *
 * Palette mirrors mphb-calendar-custom.css so both pickers look identical.
 */

.villa-datepicker {
    --vdp-olive:      #7A8F6A;
    --vdp-olive-dark: #5d7152;
    --vdp-olive-soft: rgba(122, 143, 106, 0.18);
    --vdp-terra:      #C7774D;
    --vdp-terra-dark: #a85e38;
    --vdp-cream-50:   #FAF6F1;
    --vdp-cream-100:  #F3EADE;
    --vdp-cream-200:  #E7D8C9;
    --vdp-cream-500:  #A89582;
    --vdp-graphite:   #2F2F2F;
    --vdp-serif:      "Cormorant Garamond", Georgia, serif;
    --vdp-sans:       "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    display: block;
    width: 100%;
    padding: 18px 18px 14px;
    background-color: #fff;
    border: 1px solid var(--vdp-cream-200);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 10px 30px -10px rgba(47, 47, 47, 0.1);
    font-family: var(--vdp-sans);
    color: var(--vdp-graphite);
    box-sizing: border-box;
}

.villa-datepicker * {
    box-sizing: border-box;
}

/* ---------- header: Check-in | → | Check-out ----------------------- */
.villa-dp__head {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 4px 4px 14px;
    border-bottom: 1px solid var(--vdp-cream-100);
    margin-bottom: 14px;
}

.villa-dp__head-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.villa-dp__head-col--out { text-align: right; }

.villa-dp__head-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--vdp-cream-500);
}

.villa-dp__head-value {
    font-family: var(--vdp-serif);
    font-size: 18px;
    font-weight: 500;
    color: var(--vdp-graphite);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.villa-dp__head-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background-color: var(--vdp-cream-50);
    color: var(--vdp-olive);
}

/* ---------- nav row ------------------------------------------------- */
.villa-dp__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px 10px;
}

.villa-dp__nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background-color: var(--vdp-cream-50);
    color: var(--vdp-graphite);
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.villa-dp__nav-btn:hover {
    background-color: var(--vdp-cream-100);
    color: var(--vdp-olive-dark);
}

.villa-dp__nav-btn:active {
    transform: scale(0.95);
}

.villa-dp__title {
    font-family: var(--vdp-serif);
    font-size: 16px;
    font-weight: 500;
    color: var(--vdp-graphite);
    text-align: center;
}

/* The per-month title inside the grid (used on desktop multi-month view) */
.villa-dp__month-title {
    font-family: var(--vdp-serif);
    font-size: 15px;
    font-weight: 500;
    color: var(--vdp-graphite);
    text-align: center;
    padding: 4px 0 10px;
}

/* Hide the global nav title when we show per-month titles on desktop */
@media (min-width: 640px) {
    .villa-dp__title { display: none; }
}

/* ---------- grid of months ----------------------------------------- */
.villa-dp__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 640px) {
    .villa-dp__grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

.villa-dp__month {
    min-width: 0;
}

/* Hide the second month on mobile */
.villa-dp__month--second { display: none; }
@media (min-width: 640px) {
    .villa-dp__month--second { display: block; }
}

/* ---------- table -------------------------------------------------- */
.villa-dp__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 2px;
    table-layout: fixed;
}

.villa-dp__table th {
    padding: 4px 0 6px;
    font-family: var(--vdp-sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--vdp-cream-500);
    text-align: center;
}

.villa-dp__cell {
    padding: 0;
    text-align: center;
    vertical-align: middle;
}

.villa-dp__cell--empty { height: 0; }

/* ---------- day button --------------------------------------------- */
.villa-dp__day {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background-color: transparent;
    font-family: var(--vdp-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--vdp-graphite);
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
    line-height: 1;
}

.villa-dp__day:hover:not(:disabled):not(.is-check-in):not(.is-check-out) {
    background-color: var(--vdp-cream-100);
    color: var(--vdp-olive-dark);
}

.villa-dp__day.is-today {
    box-shadow: inset 0 0 0 1.5px var(--vdp-cream-200);
    font-weight: 600;
}

.villa-dp__day.is-past {
    color: #c9bfb3;
    cursor: not-allowed;
}

.villa-dp__day.is-past:hover {
    background-color: transparent;
    color: #c9bfb3;
}

.villa-dp__day.is-in-range {
    background-color: var(--vdp-olive-soft);
    color: var(--vdp-olive-dark);
    border-radius: 0;
}

.villa-dp__day.is-check-in,
.villa-dp__day.is-check-out {
    background-color: var(--vdp-terra);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px -4px rgba(199, 119, 77, 0.5);
}

/* Soften the corners between range and endpoints */
.villa-dp__day.is-check-in {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.villa-dp__day.is-check-out {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Single-day check-in (no check-out yet) keeps full pill */
.villa-dp__day.is-check-in:not(.has-range) {
    border-radius: 999px;
}

/* ---------- footer ------------------------------------------------- */
.villa-dp__foot {
    display: flex;
    justify-content: flex-end;
    padding: 12px 0 2px;
    margin-top: 10px;
    border-top: 1px solid var(--vdp-cream-100);
}

.villa-dp__clear {
    padding: 6px 14px;
    background-color: transparent;
    border: 0;
    border-radius: 8px;
    font-family: var(--vdp-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--vdp-cream-500);
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.villa-dp__clear:hover {
    background-color: var(--vdp-cream-100);
    color: var(--vdp-olive-dark);
}
