/**
 * Custom guest/host date range picker modal (app parity).
 */
:root {
    --hp-cdp-guest: #ff931e;
    --hp-cdp-guest-range: rgba(255, 147, 30, 0.15);
    --hp-cdp-host: #2a9d8f;
    --hp-cdp-host-range: rgba(42, 157, 143, 0.15);
    --hp-cdp-blocked: #e53935;
    --hp-cdp-blocked-soft: rgba(229, 57, 53, 0.16);
    --hp-cdp-blocked-text: #c62828;
    --hp-cdp-bg: #f4f6fa;
    --hp-cdp-border: #e6e9ef;
    --hp-cdp-text: #1a1d21;
    --hp-cdp-muted: #9aa3a6;
}

body.hp-cdp-open,
body.hp-cdp-suppress-outside {
    user-select: none;
    -webkit-user-select: none;
}

body.hp-cdp-open.hp-cdp-modal-lock {
    overflow: hidden;
}

.hp-cdp-overlay {
    position: fixed;
    inset: 0;
    z-index: 10060;
    box-sizing: border-box;
}

.hp-cdp-overlay--modal {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 16, 32, 0.45);
}

.hp-cdp-overlay--popover {
    background: transparent;
}

.hp-cdp-dialog {
    width: min(100%, 420px);
    max-height: calc(100vh - 32px);
    overflow: auto;
    background: #fff;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 20px 60px rgba(0, 29, 61, 0.2);
    box-sizing: border-box;
    font-family: "Work Sans", system-ui, sans-serif;
    color: var(--hp-cdp-text);
}

.hp-cdp-overlay--modal:has(.hp-cdp-months--dual) .hp-cdp-dialog {
    width: min(100%, 760px);
}

.hp-cdp-overlay--popover .hp-cdp-dialog {
    box-shadow: 0 12px 40px rgba(0, 29, 61, 0.18), 0 0 0 1px rgba(0, 29, 61, 0.06);
}

.hp-cdp--guest {
    --hp-cdp-primary: var(--hp-cdp-guest);
    --hp-cdp-range: var(--hp-cdp-guest-range);
}

.hp-cdp--host {
    --hp-cdp-primary: var(--hp-cdp-host);
    --hp-cdp-range: var(--hp-cdp-host-range);
}

.hp-cdp-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    background: var(--hp-cdp-bg);
    border: 1px solid var(--hp-cdp-border);
    border-radius: 14px;
    margin-bottom: 14px;
}

.hp-cdp-tab {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border: 1.2px solid transparent;
    background: transparent;
    border-radius: 10px;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    min-width: 0;
}

.hp-cdp-tab.is-active {
    background: #fff;
    border-color: color-mix(in srgb, var(--hp-cdp-primary) 35%, transparent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.hp-cdp-tab-dot {
    width: 8px;
    height: 8px;
    margin-top: 4px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: rgba(154, 163, 166, 0.5);
}

.hp-cdp-tab.is-active .hp-cdp-tab-dot {
    background: var(--hp-cdp-primary);
}

.hp-cdp-tab-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hp-cdp-tab-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--hp-cdp-muted);
}

.hp-cdp-tab.is-active .hp-cdp-tab-label {
    color: var(--hp-cdp-primary);
}

.hp-cdp-tab-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--hp-cdp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-cdp-tab:not(.is-active) .hp-cdp-tab-value {
    color: var(--hp-cdp-muted);
}

.hp-cdp-stay-hints {
    margin: 0 0 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--hp-cdp-muted);
}

.hp-cdp-stay-hints__blocked {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    text-align: left;
    color: var(--hp-cdp-blocked-text);
    font-weight: 600;
}

.hp-cdp-stay-hints__swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--hp-cdp-blocked-soft);
    box-shadow: inset 0 0 0 1px rgba(198, 40, 40, 0.35);
    flex-shrink: 0;
}

.hp-cdp-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.hp-cdp-nav-spacer {
    flex: 1;
    text-align: center;
}

.hp-cdp-nav-duration {
    font-size: 13px;
    font-weight: 600;
    color: var(--hp-cdp-primary);
    line-height: 36px;
}

.hp-cdp-nav-hint {
    font-size: 12px;
    font-weight: 600;
    color: var(--hp-cdp-blocked);
    line-height: 1.25;
    padding: 0 6px;
}

.hp-cdp-nav-btn {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--hp-cdp-muted);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
}

.hp-cdp-nav-btn:hover:not(:disabled):not(.is-disabled) {
    background: var(--hp-cdp-bg);
    color: var(--hp-cdp-text);
}

.hp-cdp-nav-btn:disabled,
.hp-cdp-nav-btn.is-disabled {
    opacity: 0.3;
    cursor: default;
}

.hp-cdp-months {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.hp-cdp-months--dual {
    grid-template-columns: 1fr 1fr;
}

.hp-cdp-month-title {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    margin: 4px 0 12px;
}

.hp-cdp-weekdays,
.hp-cdp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.hp-cdp-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--hp-cdp-muted);
    padding-bottom: 8px;
}

.hp-cdp-day {
    position: relative;
    height: 40px;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 13px;
    color: var(--hp-cdp-text);
    cursor: pointer;
    border-radius: 0;
    z-index: 1;
}

.hp-cdp-day::before {
    content: "";
    position: absolute;
    inset: 1px 0;
    z-index: -2;
    background: transparent;
}

.hp-cdp-day.is-in-range::before,
.hp-cdp-day.has-range-after::before,
.hp-cdp-day.has-range-before::before {
    background: var(--hp-cdp-range);
}

.hp-cdp-day.has-range-after::before {
    left: 50%;
    right: 0;
}

.hp-cdp-day.has-range-before::before {
    left: 0;
    right: 50%;
}

.hp-cdp-day::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 36px;
    height: 36px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: -1;
    background: transparent;
}

.hp-cdp-day.is-start::after,
.hp-cdp-day.is-end::after {
    background: var(--hp-cdp-primary);
}

.hp-cdp-day.is-blocked::after {
    background: var(--hp-cdp-blocked-soft);
}

.hp-cdp-day.is-start,
.hp-cdp-day.is-end {
    color: #fff;
    font-weight: 600;
}

.hp-cdp-day.is-blocked {
    color: var(--hp-cdp-blocked-text);
    font-weight: 600;
}

.hp-cdp-day.is-outside,
.hp-cdp-day.is-disabled {
    color: rgba(154, 163, 166, 0.45);
    cursor: default;
}

/* Adjacent-month filler days: no blocked/range paint — keep them visually quiet. */
.hp-cdp-day.is-outside {
    font-weight: 400;
}

.hp-cdp-day.is-outside::after,
.hp-cdp-day.is-outside::before {
    background: transparent !important;
}

.hp-cdp-day.is-outside.is-blocked,
.hp-cdp-day.is-outside.is-start,
.hp-cdp-day.is-outside.is-end,
.hp-cdp-day.is-outside.is-in-range {
    color: rgba(154, 163, 166, 0.4);
    font-weight: 400;
}

.hp-cdp-day:disabled {
    cursor: default;
}

.hp-cdp-day:not(:disabled):not(.is-blocked):hover {
    color: var(--hp-cdp-primary);
}

.hp-cdp-error {
    margin-top: 10px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--hp-cdp-blocked);
}


.hp-cdp-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 18px;
}

.hp-cdp-btn {
    height: 46px;
    border-radius: 12px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.hp-cdp-btn--cancel {
    border: 1px solid var(--hp-cdp-border);
    background: var(--hp-cdp-bg);
    color: var(--hp-cdp-text);
}

.hp-cdp-btn--apply {
    border: 0;
    background: var(--hp-cdp-primary);
    color: #fff;
    box-shadow: 0 3px 8px color-mix(in srgb, var(--hp-cdp-primary) 30%, transparent);
}

.hp-cdp-btn--apply.is-disabled,
.hp-cdp-btn--apply:disabled {
    opacity: 0.35;
    box-shadow: none;
    cursor: default;
}

@media (max-width: 899px) {
    .hp-cdp-months--dual {
        grid-template-columns: 1fr;
    }

    .hp-cdp-overlay:has(.hp-cdp-months--dual) .hp-cdp-dialog {
        width: min(100%, 420px);
    }
}
