/* Listnova search calendar display modes — 1.0.0-rc2-design9.22
 * This file is intentionally loaded after ui-system/rental/design-system.
 * The generic UI system no longer uses !important for the search calendar;
 * only the explicit Elementor display mode owns geometry and visibility here.
 */
html.ln-search-datepicker-open{overflow:hidden!important}
.ln-search-x__date-backdrop[hidden]{display:none!important}
html body .ln-search-x__date-backdrop{
  position:fixed!important;inset:0!important;z-index:2147483000!important;
  background:rgba(17,24,22,.28)!important;backdrop-filter:blur(5px)!important;
}

/* Shared desktop reset: prevents old UI-system/rental geometry from leaking in. */
@media(min-width:821px){
  html body .ln-search-x__date-popover[data-ln-calendar-display]{
    right:auto!important;bottom:auto!important;max-height:none!important;
    background:var(--ln-front-surface,#fff)!important;color:var(--sx-ink,var(--ln-ink,var(--ln-front-text,#1f2937)))!important;
  }

  /* 1 — Popup centered */
  html body .ln-search-x__date-popover[data-ln-calendar-display="popup"],
  html body .ln-search-x__date-popover.is-display-popup{
    position:fixed!important;inset:auto!important;left:50%!important;top:50%!important;
    width:min(460px,calc(100vw - 32px))!important;max-width:calc(100vw - 32px)!important;
    max-height:calc(100vh - 48px)!important;overflow:auto!important;
    padding:18px 18px 15px!important;border-radius:24px!important;
    box-shadow:0 28px 80px rgba(15,23,20,.22)!important;
    transform:translate(-50%,-50%)!important;z-index:2147483001!important;
  }
  html body .ln-search-x__date-popover[data-ln-calendar-display="popup"]:before,
  html body .ln-search-x__date-popover.is-display-popup:before{display:none!important}
  html body .ln-search-x__date-popover[data-ln-calendar-display="popup"]>header strong,
  html body .ln-search-x__date-popover.is-display-popup>header strong{display:block!important}
  html body .ln-search-x__date-popover[data-ln-calendar-display="popup"] .ln-search-x__date-summary,
  html body .ln-search-x__date-popover.is-display-popup .ln-search-x__date-summary{display:grid!important}

  /* 2 — Inline detailed */
  html body .ln-search-x__date-popover[data-ln-calendar-display="inline"],
  html body .ln-search-x__date-popover.is-display-inline{
    position:absolute!important;left:0;top:auto;transform:none!important;
    width:430px!important;max-width:min(430px,calc(100vw - 32px))!important;
    overflow:visible!important;padding:16px!important;border-radius:20px!important;
    box-shadow:0 22px 58px rgba(20,49,42,.16)!important;z-index:140!important;
  }
  html body .ln-search-x__date-popover[data-ln-calendar-display="inline"]:before,
  html body .ln-search-x__date-popover.is-display-inline:before{display:block!important}
  html body .ln-search-x__date-popover[data-ln-calendar-display="inline"]>header{
    min-height:36px!important;margin:0 0 12px!important;
  }
  html body .ln-search-x__date-popover[data-ln-calendar-display="inline"]>header strong,
  html body .ln-search-x__date-popover.is-display-inline>header strong{display:block!important;font-size:.94rem!important}
  html body .ln-search-x__date-popover[data-ln-calendar-display="inline"] .ln-search-x__date-summary,
  html body .ln-search-x__date-popover.is-display-inline .ln-search-x__date-summary{
    display:grid!important;margin-bottom:14px!important;padding:0!important;
  }
  html body .ln-search-x__date-popover[data-ln-calendar-display="inline"] .ln-search-x__date-summary>button,
  html body .ln-search-x__date-popover.is-display-inline .ln-search-x__date-summary>button{min-height:56px!important;padding:10px 13px!important}
  html body .ln-search-x__date-popover[data-ln-calendar-display="inline"] .ln-search-x__calendar-grid button,
  html body .ln-search-x__date-popover.is-display-inline .ln-search-x__calendar-grid button{min-height:40px!important;height:40px!important}

  /* 3 — Compact under the clicked field */
  html body .ln-search-x__date-popover[data-ln-calendar-display="compact"],
  html body .ln-search-x__date-popover.is-display-compact{
    position:absolute!important;left:0;top:auto;transform:none!important;
    width:306px!important;max-width:min(306px,calc(100vw - 24px))!important;
    overflow:visible!important;padding:10px 11px 9px!important;border-radius:16px!important;
    box-shadow:0 16px 38px rgba(20,49,42,.14)!important;z-index:140!important;
  }
  html body .ln-search-x__date-popover[data-ln-calendar-display="compact"]:before,
  html body .ln-search-x__date-popover.is-display-compact:before{
    display:block!important;top:-5px!important;left:28px!important;width:10px!important;height:10px!important;
  }
  html body .ln-search-x__date-popover[data-ln-calendar-display="compact"]>header,
  html body .ln-search-x__date-popover.is-display-compact>header{min-height:27px!important;margin:0 0 3px!important}
  html body .ln-search-x__date-popover[data-ln-calendar-display="compact"]>header strong,
  html body .ln-search-x__date-popover.is-display-compact>header strong{display:none!important}
  html body .ln-search-x__date-popover[data-ln-calendar-display="compact"]>header small,
  html body .ln-search-x__date-popover.is-display-compact>header small{
    display:block!important;font-size:.62rem!important;line-height:1.25!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }
  html body .ln-search-x__date-popover[data-ln-calendar-display="compact"]>header button,
  html body .ln-search-x__date-popover.is-display-compact>header button{width:28px!important;height:28px!important;flex-basis:28px!important}
  html body .ln-search-x__date-popover[data-ln-calendar-display="compact"] .ln-search-x__date-summary,
  html body .ln-search-x__date-popover.is-display-compact .ln-search-x__date-summary{display:none!important}
  html body .ln-search-x__date-popover[data-ln-calendar-display="compact"] .ln-search-x__calendar-head,
  html body .ln-search-x__date-popover.is-display-compact .ln-search-x__calendar-head{margin:0 0 3px!important}
  html body .ln-search-x__date-popover[data-ln-calendar-display="compact"] .ln-search-x__calendar-grid,
  html body .ln-search-x__date-popover.is-display-compact .ln-search-x__calendar-grid{gap:1px!important}
  html body .ln-search-x__date-popover[data-ln-calendar-display="compact"] .ln-search-x__calendar-grid button,
  html body .ln-search-x__date-popover.is-display-compact .ln-search-x__calendar-grid button{min-height:32px!important;height:32px!important;border-radius:8px!important;font-size:.66rem!important}
  html body .ln-search-x__date-popover[data-ln-calendar-display="compact"] .ln-search-x__weekdays span,
  html body .ln-search-x__date-popover.is-display-compact .ln-search-x__weekdays span{min-height:23px!important;padding:0!important;font-size:.56rem!important}
  html body .ln-search-x__date-popover[data-ln-calendar-display="compact"]>footer,
  html body .ln-search-x__date-popover.is-display-compact>footer{min-height:28px!important;margin-top:4px!important;padding-top:6px!important}
}

@media(max-width:820px){
  html.ln-search-datepicker-open{overflow:auto!important}
  html body .ln-search-x__date-backdrop{display:none!important}
}
