/* Treasure Date Search Controller 0.3.33 — enhanced-only presentation. */

:host([data-tvr-date-active]) {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    pointer-events: auto !important;
}

:host([data-tvr-date-active]) .container,
:host([data-tvr-date-active]) .container.show,
:host([data-tvr-date-active]) .container.calc {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
}

:host([data-tvr-date-active]) .calendars {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(250px, 1fr)) !important;
    gap: 18px !important;
}

:host([data-tvr-date-active]) .month {
    padding: 8px;
}

:host([data-tvr-date-active]) .month-name {
    display: block;
    padding: 8px;
    text-align: center;
    font-weight: 800;
}

:host([data-tvr-date-active]) .day-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(44px, 1fr));
    gap: 4px;
}

:host([data-tvr-date-active]) .calendar > .header {
    padding: 8px !important;
}

:host([data-tvr-date-active]) .day,
:host([data-tvr-date-active]) .calendar > .days-grid > .day {
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 10px !important;
}

:host([data-tvr-date-active]) .day.in-range,
:host([data-tvr-date-active]) .calendar > .days-grid > .day.in-range {
    background: #d8f1f7 !important;
    color: #17384b !important;
}

:host([data-tvr-date-active]) .day.start,
:host([data-tvr-date-active]) .day.end,
:host([data-tvr-date-active]) .calendar > .days-grid > .day.start,
:host([data-tvr-date-active]) .calendar > .days-grid > .day.end {
    background: #07263b !important;
    color: #ffffff !important;
    outline: 2px solid #8bd5e7 !important;
}

:host([data-tvr-date-active]) .day:focus-visible,
:host([data-tvr-date-active]) .calendar > .days-grid > .day:focus-visible,
:host([data-tvr-date-active]) .previous-button:focus-visible,
:host([data-tvr-date-active]) .next-button:focus-visible {
    outline: 3px solid #ef4545 !important;
    outline-offset: 2px !important;
}

body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
  #abe-results-search button[name="propSearch"] {
    display: none !important;
}

body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
  #abe-results-search .abe-button-res-wrapper {
    display: none !important;
}

body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
  #abe-results-search #search-arrival,
body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
  #abe-results-search #search-departure,
body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
  #abe-filters-activator,
body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
  .abe-sort-wrapper .vrpsorter,
body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
  .abe-sort-wrapper .abe-map-activator,
body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
  .abe-sort-wrapper .abe-favorite-show,
body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
  .abe-sort-wrapper .abe-favorite-show > a {
    border-radius: 12px !important;
}

body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
  #abe-results-search #search-arrival,
body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
  #abe-results-search #search-departure {
    cursor: pointer;
}

body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
  #abe-results-search #search-arrival:focus-visible,
body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
  #abe-results-search #search-departure:focus-visible,
body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
  #abe-filters-activator:focus-visible,
body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
  .abe-sort-wrapper .vrpsorter:focus-visible,
body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
  .abe-sort-wrapper .abe-map-activator:focus-visible,
body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
  .abe-sort-wrapper .abe-favorite-show > a:focus-visible {
    outline: 3px solid #ef4545 !important;
    outline-offset: 2px !important;
}

body.tvr-date-dialog-open {
    overscroll-behavior: none;
}

[data-tvr-date-dialog] {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(7, 38, 59, 0.58);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

[data-tvr-date-dialog][hidden] {
    display: none !important;
}

[data-tvr-date-panel] {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: min(720px, calc(100vw - 48px));
    max-width: 720px;
    max-height: min(760px, calc(100dvh - 48px));
    overflow: hidden;
    border: 1px solid #d7e1e5;
    border-radius: 20px;
    background: #ffffff;
    color: #17384b;
    box-shadow: 0 24px 70px rgba(7, 38, 59, 0.3);
}

[data-tvr-date-header] {
    box-sizing: border-box;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
    padding: 12px 16px 12px 22px;
    border-bottom: 1px solid #d7e1e5;
    background: #fbf5ed;
}

[data-tvr-date-header] h2 {
    margin: 0;
    color: #07263b;
    font-family: inherit;
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    font-weight: 800;
    line-height: 1.2;
}

[data-tvr-date-close],
[data-tvr-date-clear],
[data-tvr-date-apply] {
    box-sizing: border-box;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    font: inherit;
    font-weight: 800;
    line-height: 1.1;
    cursor: pointer;
}

[data-tvr-date-close] {
    padding: 0 14px;
    border: 1px solid #a8adb1;
    background: #ffffff;
    color: #07263b !important;
}

[data-tvr-date-calendar-slot] {
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 12px 18px 4px;
    background: #ffffff;
}

[data-tvr-date-calendar-slot] > .easepick-wrapper {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    pointer-events: auto !important;
}

[data-tvr-date-status] {
    flex: 0 0 auto;
    min-height: 22px;
    margin: 0;
    padding: 6px 22px 10px;
    color: #407386;
    font-size: 0.9rem;
    line-height: 1.35;
}

[data-tvr-date-actions] {
    box-sizing: border-box;
    position: sticky;
    bottom: 0;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 72px;
    padding: 12px 18px;
    border-top: 1px solid #d7e1e5;
    background: #fbf5ed;
    box-shadow: 0 -8px 24px rgba(7, 38, 59, 0.06);
}

[data-tvr-date-clear] {
    padding: 0 17px;
    border: 1px solid #a8adb1;
    background: #ffffff;
    color: #07263b !important;
}

[data-tvr-date-apply] {
    min-width: 136px;
    padding: 0 20px;
    border: 2px solid #07263b;
    background: #07263b;
    color: #ffffff;
}

[data-tvr-date-apply]:disabled {
    border-color: #c8d1d5;
    background: #e6ebed;
    color: #708590;
    cursor: not-allowed;
}

[data-tvr-date-close]:hover,
[data-tvr-date-clear]:hover {
    border-color: #407386;
    background: #f5f8f8;
}

[data-tvr-date-apply]:not(:disabled):hover {
    border-color: #ef4545;
    background: #17384b;
}

[data-tvr-date-close]:focus-visible,
[data-tvr-date-clear]:focus-visible,
[data-tvr-date-apply]:focus-visible {
    outline: 3px solid #ef4545;
    outline-offset: 2px;
}

@media (max-width: 767px) {
    body.tvr-search-modernization-next .abe-results-page.tvr-date-search-enhanced
      .abe-sort-wrapper .vrpsorter {
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    :host([data-tvr-date-active]) .calendars {
        grid-template-columns: 1fr !important;
    }

    :host([data-tvr-date-active]) .calendars .calendar:nth-child(n + 2),
    :host([data-tvr-date-active]) .calendars .month:nth-child(n + 2) {
        display: none !important;
    }

    :host([data-tvr-date-active]) .container > main {
        height: auto !important;
        overflow: visible !important;
        padding: 0 !important;
    }

    [data-tvr-date-dialog] {
        display: flex;
        align-items: end;
        justify-content: center;
        padding: 0;
    }

    [data-tvr-date-panel] {
        position: relative;
        bottom: 0;
        width: 100%;
        max-width: none;
        max-height: min(86dvh, 760px);
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 20px 20px 0 0;
    }

    [data-tvr-date-header] {
        min-height: 64px;
        padding-inline: 18px 12px;
    }

    [data-tvr-date-calendar-slot] {
        padding: 8px 10px 2px;
    }

    [data-tvr-date-status] {
        padding: 6px 16px 8px;
        font-size: 0.86rem;
    }

    [data-tvr-date-actions] {
        min-height: 76px;
        padding: 12px 14px;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    [data-tvr-date-clear],
    [data-tvr-date-apply] {
        flex: 1 1 50%;
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-tvr-date-dialog],
    [data-tvr-date-panel],
    [data-tvr-date-dialog] * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
