/* Shared calendar only; preserves Flatsome and the guest-capacity component. */
.hayha-calendar-popup.hayha-date-modal {
    padding: 24px; min-height: 0;
    margin: 0; transform: none; border: 0; border-radius: 16px;
    background: var(--hayha-theme-surface); color: var(--hayha-theme-text); z-index: 100005; box-sizing: border-box;
    overflow: hidden; display: flex; font-family: inherit;
}
.hayha-calendar-popup[hidden], .hayha-calendar-sheet[hidden] { display: none !important; }
.hayha-calendar-popup .hayha-date-modal__inner { display: flex; flex-direction: column; min-height: 0; width: 100%; }
.hayha-calendar-popup .hayha-date-modal__months-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 68px; min-height: 0; overflow: visible; padding: 0 0 16px; }
.hayha-calendar-popup .hayha-cal-header { height: 40px; margin-bottom: 20px; }
.hayha-calendar-popup .hayha-cal-month-title { font-size: 20px; font-weight: 500; color: var(--hayha-theme-heading); }
.hayha-calendar-popup .hayha-cal-nav-btn { width: 40px; height: 40px; min-width: 40px; min-height: 40px; border: 0; border-radius: 0; background: transparent; color: var(--hayha-theme-text); box-shadow: none; margin: 0; padding: 0; }
.hayha-calendar-popup .hayha-cal-nav-btn svg { width: 28px; height: 28px; flex: 0 0 28px; max-width: none; fill: none; stroke: currentColor; stroke-width: 2.25; filter: none; }
.hayha-calendar-popup .hayha-cal-nav-btn:hover { color: var(--hayha-theme-hover); background: transparent; }
.hayha-calendar-popup .hayha-cal-nav-btn:disabled { color: var(--hayha-theme-disabled); opacity: 1; }
.hayha-calendar-popup .hayha-date-modal__footer { flex: 0 0 auto; height: auto; min-height: 0; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--hayha-theme-border); gap: 0; justify-content: flex-end; }
.hayha-calendar-popup .hayha-date-modal__summary-text { font-size: 14px; font-weight: 500; color: var(--hayha-theme-text); }
.hayha-calendar-popup .hayha-date-modal__subnote { font-size: 12px; color: var(--hayha-theme-muted); margin-top: 6px; }
.hayha-calendar-month-body { min-width: 0; }
.hayha-calendar-weekdays, .hayha-calendar-sheet .hayha-mobile-cal-weekdays { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); text-align: center; color: var(--hayha-theme-muted); font-size: 12px; font-weight: 400; margin: 0 0 24px; }
.hayha-calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 8px 0; }
.hayha-calendar-grid .hayha-calendar-day, .hayha-calendar-empty {
    box-sizing: border-box; position: relative; width: 100%; min-width: 0; max-width: none;
    height: calc(var(--hayha-calendar-circle,40px) + 4px); min-height: 0;
    display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 0; background: transparent !important; padding: 0; margin: 0;
    box-shadow: none; color: var(--hayha-theme-text) !important; font: inherit; font-size: 14px; font-weight: 400;
    line-height: 1; text-transform: none; letter-spacing: normal; cursor: pointer;
}
.hayha-calendar-empty { pointer-events: none; }
.hayha-calendar-day::before { content: ""; position: absolute; inset: 0; pointer-events: none; }
.hayha-calendar-day.is-in-range::before { background: var(--hayha-theme-tint); }
.hayha-calendar-day.has-range-after::before { left: 50%; background: var(--hayha-theme-tint); }
.hayha-calendar-day.has-range-before::before { right: 50%; background: var(--hayha-theme-tint); }
.hayha-calendar-number { width: var(--hayha-calendar-circle,40px); height: var(--hayha-calendar-circle,40px); border: 1px solid transparent; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; transition: border-color 180ms ease; }
.hayha-calendar-day.is-selected-start .hayha-calendar-number, .hayha-calendar-day.is-selected-end .hayha-calendar-number { background: var(--hayha-theme-accent); color: var(--hayha-theme-contrast); font-weight: 600; }
.hayha-calendar-day.is-today .hayha-calendar-number::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; bottom: 4px; background: var(--hayha-theme-accent); }
.hayha-calendar-day.is-today.is-selected-start .hayha-calendar-number::after, .hayha-calendar-day.is-today.is-selected-end .hayha-calendar-number::after { background: var(--hayha-theme-surface); }
.hayha-calendar-grid .hayha-calendar-day:disabled { color: var(--hayha-theme-disabled) !important; cursor: not-allowed; opacity: 1; }
@media (hover: hover) { .hayha-calendar-day:not(:disabled):hover .hayha-calendar-number { border-color: var(--hayha-theme-hover); } }
.hayha-calendar-day.is-hovered:not(:disabled) .hayha-calendar-number { border-color: var(--hayha-theme-accent); }
.hayha-calendar-popup .hayha-calendar-day:focus-visible, .hayha-calendar-sheet .hayha-calendar-day:focus-visible { outline: none !important; }
.hayha-calendar-day.is-preview-end .hayha-calendar-number { border-color: var(--hayha-theme-accent); }
.hayha-calendar-day:focus-visible .hayha-calendar-number, .hayha-calendar-popup button:focus-visible { outline: 2px solid var(--hayha-theme-accent); outline-offset: 2px; }
.hayha-calendar-tooltip { position: fixed; z-index: 100020; width: max-content; max-width: calc(100% - 16px); padding: 10px 14px; border-radius: 7px; background: var(--hayha-theme-heading); color: var(--hayha-theme-contrast); font-family: inherit; font-weight: 500; font-size: 12px; line-height: 1.4; pointer-events: none; box-shadow: 0 4px 12px #0001; }
.hayha-calendar-tooltip[hidden] { display: none; }
.hayha-calendar-sheet { --hayha-calendar-circle: 44px; }
.hayha-calendar-sheet.hayha-calendar-shell, .hayha-calendar-sheet .hayha-calendar-shell { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; max-height: none; min-height: 0; border-radius: 16px 16px 0 0; background: var(--hayha-theme-surface); color: var(--hayha-theme-text); overflow: hidden; box-sizing: border-box; margin: 0; padding: 0; }
.hayha-calendar-sheet .hayha-sheet-handle-bar { display: none; }
.hayha-calendar-sheet .hayha-sheet-header { position: relative; flex: 0 0 auto; min-height: 56px; height: 56px; box-sizing: border-box; display: flex; align-items: center; padding: 12px 20px; background: var(--hayha-theme-surface); border-bottom: 0; }
.hayha-calendar-sheet .hayha-sheet-title { position: absolute; left: 50%; transform: translateX(-50%); color: var(--hayha-theme-heading); font-size: 18px; font-weight: 600; }
.hayha-calendar-sheet .hayha-sheet-close-btn { position: absolute; right: 16px; top: 8px; width: 40px; height: 40px; min-width: 40px; min-height: 40px; margin: 0; padding: 8px; transform: none; box-sizing: border-box; }
.hayha-calendar-sheet .hayha-mobile-cal-weekdays { flex: 0 0 auto; margin: 0; padding: 8px 16px 16px; background: var(--hayha-theme-surface); }
.hayha-calendar-sheet .hayha-calendar-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch; padding: 0 16px; max-height: none; background: var(--hayha-theme-surface); }
.hayha-calendar-sheet .hayha-mobile-calendar-container { min-height: 0; max-height: none; overflow: visible; margin: 0; padding: 0; }
.hayha-calendar-mobile-month { margin: 0 0 26px; padding: 0; }
.hayha-calendar-mobile-title { margin: 4px 0 20px; text-align: center; color: var(--hayha-theme-heading); font-size: 20px; font-weight: 500; line-height: 1.4; }
.hayha-calendar-sheet .hayha-calendar-day, .hayha-calendar-sheet .hayha-calendar-empty { height: var(--hayha-calendar-circle,44px); }
.hayha-calendar-sheet .hayha-calendar-fixed-footer { flex: 0 0 auto; height: auto; padding: 12px 24px max(16px,env(safe-area-inset-bottom)); background: var(--hayha-theme-surface); border-top: 1px solid var(--hayha-theme-border); display: block; }
.hayha-calendar-sheet .hayha-mobile-date-summary { margin: 0 0 6px; padding: 0; background: transparent; border: 0; border-radius: 0; font-size: 13px; display: flex; gap: 12px; }
.hayha-calendar-sheet .hayha-mobile-date-summary-card { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 12px; margin-bottom: 4px; padding: 0; background: transparent; border: 0; }
.hayha-calendar-sheet .hayha-mobile-date-summary-col { display: flex; flex-direction: column; gap: 4px; }
.hayha-calendar-sheet .hayha-mobile-date-summary-col:last-child { text-align: right; }
.hayha-calendar-sheet .hayha-summary-sublabel { color: var(--hayha-theme-muted); font-size: 12px; }
.hayha-calendar-sheet .hayha-summary-val-orange { color: var(--hayha-theme-accent); font-size: 14px; font-weight: 600; }
.hayha-calendar-sheet .hayha-summary-val-dark { color: var(--hayha-theme-text); font-size: 14px; font-weight: 600; }
.hayha-calendar-sheet .hayha-summary-dash { color: var(--hayha-theme-muted); }
.hayha-calendar-status { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hayha-calendar-sheet .hayha-sheet-footer button { display: block; width: 100%; min-height: 40px; height: 40px; border-radius: 24px; margin: 12px 0 0; padding: 0 16px; background: var(--hayha-theme-accent); border: 0; color: var(--hayha-theme-contrast); font-family: inherit; font-weight: 600; font-size: 14px; line-height: 1.5; text-transform: none; }
.hayha-calendar-sheet .hayha-sheet-footer button:disabled { opacity: .45; }
.hayha-calendar-sheet .hayha-sheet-footer button:focus-visible { outline: 2px solid var(--hayha-theme-border); outline-offset: 3px; }
.hayha-calendar-sheet .hayha-calendar-local-note { color: var(--hayha-theme-muted); font-size: 11px; line-height: 1.4; margin: 6px 0; text-align: right; }
.hayha-calendar-sheet .hayha-calendar-shell { height: 100% !important; }
@media (max-width: 767px) {
    .hayha-calendar-popup .hayha-date-modal__months-row { grid-template-columns: minmax(0,1fr); gap: 24px; }
    .hayha-calendar-popup .hayha-cal-month-title { font-size: 18px; }
    .hayha-calendar-popup .hayha-calendar-number { width: 36px; height: 36px; }
    .hayha-calendar-popup .hayha-calendar-day, .hayha-calendar-popup .hayha-calendar-empty { height: 40px; }
}
@media (max-width: 359px) { .hayha-calendar-sheet { --hayha-calendar-circle: 36px; } }
/* Search switches to mobile at 768px; retain an opener on Property at that exact boundary. */
@media (width: 768px) { .hayha-property-detail-page .hayha-criteria-bar-mobile { display: flex; width: 100%; align-items: center; gap: 12px; } }
@media (prefers-reduced-motion: reduce) { .hayha-calendar-popup, .hayha-calendar-sheet, .hayha-calendar-popup *, .hayha-calendar-sheet *, .hayha-calendar-number { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Non-modal search popups only. Auth/gallery retain their own modal rules. */
body .hayha-search-popup {
    position: fixed !important; inset: auto !important;
    top: var(--hayha-popup-top) !important; left: var(--hayha-popup-left) !important;
    right: auto !important; bottom: auto !important;
    width: var(--hayha-popup-width) !important; max-width: none !important;
    height: auto !important; max-height: none !important; min-height: 0 !important;
    margin: 0 !important; transform: none; box-sizing: border-box;
    z-index: 100005 !important; pointer-events: auto;
}
body .hayha-search-popup.hayha-mobile-sheet {
    display: flex !important; flex-direction: column;
    max-height: var(--hayha-popup-height) !important;
    border-radius: 16px !important; box-shadow: 0 8px 24px #0002;
    overflow: hidden !important; opacity: 1 !important; visibility: visible !important;
}
body .hayha-search-popup.hayha-calendar-sheet { height: var(--hayha-popup-height) !important; }
body .hayha-search-popup .hayha-sheet-panel {
    height: auto !important; max-height: var(--hayha-popup-height) !important;
    min-height: 0 !important; border-radius: 16px !important;
}
body .hayha-search-popup.hayha-calendar-sheet .hayha-sheet-panel { height: 100% !important; }
body .hayha-search-popup .hayha-sheet-body {
    min-height: 0; flex: 1 1 auto; overflow-y: auto; touch-action: pan-y; overscroll-behavior: auto;
}
body .hayha-search-popup .hayha-sheet-handle-bar { touch-action: pan-y; }
body .hayha-search-popup .hayha-sheet-backdrop { display: none !important; }
body .hayha-search-popup[hidden] { display: none !important; }

/* Standalone Hayha mobile uses modal sheets; desktop retains anchored popovers. */
html.hayha-reference-sheet-open,html.hayha-reference-sheet-open body{overflow:hidden}
.hayha-reference-backdrop{position:fixed;inset:0;background:#0006;z-index:100004}.hayha-reference-backdrop[hidden]{display:none}
@media(max-width:768px){
body.hayha-clean .hayha-search-popup.hayha-reference-sheet{position:fixed!important;inset:auto 0 0!important;top:auto!important;left:0!important;right:0!important;bottom:var(--hh-preview-inset,0px)!important;width:100%!important;height:calc(var(--hayha-sheet-height) - var(--hh-preview-inset,0px))!important;max-height:calc(var(--hayha-sheet-height) - var(--hh-preview-inset,0px))!important;border-radius:16px 16px 0 0!important;animation:hayha-sheet-enter 300ms cubic-bezier(.4,0,.2,1) both}
body.hayha-clean .hayha-reference-sheet .hayha-sheet-panel{height:100%!important;max-height:100%!important;border-radius:16px 16px 0 0!important}
body.hayha-clean .hayha-reference-sheet .hayha-sheet-body{min-height:0;overflow-y:auto}
@keyframes hayha-sheet-enter{from{transform:translateY(100%)}to{transform:translateY(0)}}
}
@media(prefers-reduced-motion:reduce){body.hayha-clean .hayha-reference-sheet{animation:none!important}}

@media(hover:none){.hayha-calendar-tooltip{display:none}}

/* Keep desktop popups below the search bar with internal scrolling on short screens. */
body .hayha-search-popup:not(.hayha-reference-sheet):not(.hayha-calendar-popup){max-height:var(--hayha-popup-height)!important;overflow-y:auto!important;overscroll-behavior:contain}

/* Property popups share the bar's coordinate system; scrolling cannot separate them by a frame. */
body .hayha-search-popup.hayha-popup-docked {position:absolute!important;transition:none;animation:none}
