/*
 * New mobile filters on /kruizi (124jdtwffcc), js/mobile-filters.js.
 * Only the colours and fonts already on Crusit; square corners except the
 * badge and the round arrows.
 */

/* The dialogs sit on <body>, outside .mf, and need the same tokens */
.mf,
.mf-overlay,
.mf-full {
    --mf-navy: #0B3152;
    --mf-blue: #154C7B;
    --mf-yellow: #FFDA0E;
    --mf-beige: #F2EFE9;
    --mf-border: #B9C6D2;
    --mf-field: #C9D3DC;
    --mf-line: #E3E8EC;
    --mf-muted: #55606B;
    --mf-chip-radius: 0;
}
.mf {
    display: none;
}

@media screen and (max-width: 767px) {
    .mf.is-ready {
        display: block;
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 60;
        background: #fff;
        border-bottom: 1px solid var(--mf-line);
    }
    .mf.mf-busy {
        opacity: .6;
        pointer-events: none;
    }
    /* The old filters stay on the page as the search form, out of sight -
       only once the new bar is up, so a failed script leaves the old ones */
    .mf.is-ready ~ .search-results-form.mf-replaced {
        display: none !important;
    }
}

.mf-bar {
    position: relative;
}
.mf-scroller {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}
.mf-scroller::-webkit-scrollbar {
    display: none;
}

/* White fades at the ends, a sign there is more */
.mf-bar:before,
.mf-bar:after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 28px;
    z-index: 1;
    pointer-events: none;
    transition: opacity .2s;
}
.mf-bar:before {
    left: 0;
    background: linear-gradient(to right, #fff 30%, rgba(255,255,255,0));
}
.mf-bar:after {
    right: 0;
    background: linear-gradient(to left, #fff 30%, rgba(255,255,255,0));
}
.mf-bar.at-start:before,
.mf-bar.at-end:after {
    opacity: 0;
}

.mf-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 32px;
    height: 32px;
    margin-top: -16px;
    border: 1px solid var(--mf-border);
    border-radius: 50%;
    background: #fff;
    color: var(--mf-navy);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}
.mf-arrow-prev {
    left: 4px;
}
.mf-arrow-next {
    right: 4px;
}
/* The arrows only with a mouse; a finger scrolls the bar */
@media (hover: hover) and (pointer: fine) {
    .mf-arrow {
        display: flex;
    }
    .mf-bar.at-start .mf-arrow-prev,
    .mf-bar.at-end .mf-arrow-next {
        display: none;
    }
}

.mf-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--mf-border);
    border-radius: var(--mf-chip-radius);
    background: #fff;
    color: var(--mf-navy);
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    scroll-snap-align: start;
    -webkit-tap-highlight-color: transparent;
}
.mf-chip.is-active {
    background: var(--mf-navy);
    border-color: var(--mf-navy);
    color: #fff;
}
.mf-chip-all {
    background: var(--mf-beige);
    border-color: var(--mf-beige);
}
.mf-badge {
    display: inline-block;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--mf-yellow);
    color: #010101;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

/* ------------------------------------------------------------ dialogs */

html.mf-lock,
body.mf-lock {
    overflow: hidden;
}
body.mf-lock {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
}

.mf-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10000;
    background: rgba(11, 49, 82, 0);
    transition: background .25s;
}
.mf-overlay.is-open {
    background: rgba(11, 49, 82, .5);
}
.mf-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 86%;
    display: flex;
    flex-direction: column;
    background: #fff;
    transform: translateY(100%);
    transition: transform .25s ease;
}
.mf-overlay.is-open .mf-sheet {
    transform: none;
}

.mf-full {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    background: #fff;
    transform: translateY(100%);
    transition: transform .25s ease;
}
.mf-full.is-open {
    transform: none;
}

.mf-head {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 14px 56px 10px 16px;
    border-bottom: 1px solid var(--mf-line);
}
.mf-handle {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 40px;
    height: 4px;
    margin-left: -20px;
    border-radius: 2px;
    background: var(--mf-field);
}
.mf-title {
    margin: 0;
    font-family: 'Roboto Condensed', Roboto, Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--mf-navy);
}
.mf-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--mf-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.mf-full .mf-head {
    background: var(--mf-navy);
    border-bottom: 0;
    padding-top: 10px;
}
.mf-full .mf-handle {
    display: none;
}
.mf-full .mf-title,
.mf-full .mf-close {
    color: #fff;
}

.mf-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 8px 16px 16px;
    color: var(--mf-navy);
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
}

.mf-foot {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--mf-line);
    background: #fff;
}
.mf-btn {
    flex: 1 1 0;
    min-height: 48px;
    border: 1px solid var(--mf-navy);
    border-radius: 0;
    font-family: 'Roboto Condensed', Roboto, Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
}
.mf-btn-clear {
    background: #fff;
    color: var(--mf-navy);
}
.mf-btn-save {
    background: var(--mf-yellow);
    border-color: var(--mf-yellow);
    color: #010101;
}
.mf-foot-all {
    align-items: center;
}
.mf-clear-all {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 6px;
    border: 0;
    background: none;
    color: var(--mf-blue);
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
}

/* ---------------------------------------------------------- controls */

.mf-search {
    position: -webkit-sticky;
    position: sticky;
    top: -8px;
    z-index: 1;
    padding: 8px 0;
    background: #fff;
}
.mf-search-input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--mf-field);
    border-radius: 0;
    font-size: 16px;
    color: var(--mf-navy);
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.mf-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    margin: 0;
    padding: 6px 0;
    border-bottom: 1px solid var(--mf-line);
    cursor: pointer;
    flex: 1 1 auto;
}
.mf-row-text {
    flex: 1 1 auto;
    font-size: 15px;
    line-height: 1.3;
}
.mf-check {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.mf-box {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border: 1px solid var(--mf-border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mf-box svg {
    display: none;
}
.mf-check:checked + .mf-box {
    background: var(--mf-navy);
    border-color: var(--mf-navy);
}
.mf-check:checked + .mf-box svg {
    display: block;
}
.mf-check:focus-visible + .mf-box {
    outline: 2px solid var(--mf-blue);
    outline-offset: 2px;
}
/* A region with part of it chosen: a dash */
.mf-row.is-partial .mf-box {
    background: var(--mf-navy);
    border-color: var(--mf-navy);
}
.mf-row.is-partial .mf-box:after {
    content: '';
    width: 10px;
    height: 2px;
    background: #fff;
}

/* Chosen values pinned above the list (124jdtwffcc, Dilyana's note) */
.mf-picked {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    padding: 6px 0;
    border-bottom: 1px solid var(--mf-line);
}
.mf-picked-text {
    flex: 1 1 auto;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--mf-navy);
}
.mf-picked-clear {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: -6px -7px -6px 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--mf-navy);
    cursor: pointer;
}
.mf-picked-clear svg {
    width: 16px;
    height: 16px;
}
.mf-picked-clear:focus-visible {
    outline: 2px solid var(--mf-blue);
    outline-offset: -2px;
}
.mf-tree .mf-picked + .mf-tree-line {
    margin-top: 8px;
}

.mf-empty {
    margin: 16px 0;
    color: var(--mf-muted);
}
.mf-more {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--mf-blue);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.mf-price {
    display: flex;
    gap: 12px;
    padding: 8px 0;
}
.mf-price-field {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
}
.mf-price-label {
    color: var(--mf-muted);
    font-size: 13px;
}
.mf-price-input {
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--mf-field);
    border-radius: 0;
    font-size: 16px;
    color: var(--mf-navy);
    box-sizing: border-box;
    width: 100%;
}

.mf-tabs {
    display: flex;
    margin: 8px 0 12px;
}
.mf-tab {
    flex: 1 1 0;
    min-height: 44px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: #EEEEEE;
    color: var(--mf-navy);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.mf-tab.is-active {
    background: #fff;
    border-bottom-color: var(--mf-navy);
}
.mf-hint {
    margin: 0 0 12px;
    color: var(--mf-muted);
    font-size: 14px;
    line-height: 1.4;
}
.mf-dates {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}
.mf-date {
    flex: 1 1 0;
    padding: 8px 10px;
    border: 1px solid var(--mf-field);
}
.mf-date.is-current {
    border: 2px solid var(--mf-navy);
    padding: 7px 9px;
}
.mf-date small {
    display: block;
    color: var(--mf-muted);
    font-size: 12px;
}
.mf-date b {
    font-size: 15px;
    font-weight: 500;
}

/* The site's range picker (Kalendae), one month to a screen */
.mf-calendar .kalendae {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: #fff;
    font-family: Roboto, Arial, sans-serif;
    box-sizing: border-box;
}
.mf-calendar .kalendae .k-calendar {
    float: none;
    width: 100%;
    margin: 0;
}
.mf-calendar .kalendae .k-title {
    position: relative;
    height: 44px;
    line-height: 44px;
    font-size: 16px;
    font-weight: 500;
    color: var(--mf-navy);
    text-align: center;
}
.mf-calendar .kalendae .k-btn-previous-month,
.mf-calendar .kalendae .k-btn-next-month {
    width: 44px;
    height: 44px;
    line-height: 44px;
    font-size: 22px;
    color: var(--mf-navy);
    position: absolute;
    top: 0;
}
.mf-calendar .kalendae .k-btn-previous-month {
    left: 0;
}
.mf-calendar .kalendae .k-btn-next-month {
    right: 0;
}
.mf-calendar .kalendae .k-btn-previous-year,
.mf-calendar .kalendae .k-btn-next-year {
    display: none;
}
.mf-calendar .kalendae .k-header,
.mf-calendar .kalendae .k-days {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}
.mf-calendar .kalendae .k-header span,
.mf-calendar .kalendae .k-days span {
    float: none;
    width: calc(100% / 7);
    height: 44px;
    margin: 0;
    padding: 0;
    line-height: 44px;
    font-size: 15px;
    text-align: center;
    border: 0;
    border-radius: 0;
    box-sizing: border-box;
}
.mf-calendar .kalendae .k-header span {
    height: 32px;
    line-height: 32px;
    color: var(--mf-muted);
    font-size: 13px;
}
.mf-calendar .kalendae .k-days span.k-out-of-month {
    visibility: hidden;
}
.mf-calendar .kalendae .k-days span.k-invalid {
    color: #c3c9cf;
    background: none;
}
.mf-calendar .kalendae .k-days span.k-active {
    color: var(--mf-navy);
}
.mf-calendar .kalendae .k-days span.k-range {
    background: #DCE7F0;
    color: var(--mf-navy);
}
.mf-calendar .kalendae .k-days span.k-selected,
.mf-calendar .kalendae .k-days span.k-range.k-selected {
    background: var(--mf-navy);
    color: #fff;
}

.mf-year {
    margin-bottom: 14px;
}
.mf-year-title {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}
.mf-months {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.mf-month {
    min-height: 44px;
    border: 0;
    border-radius: 0;
    background: var(--mf-beige);
    color: var(--mf-navy);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.mf-month.is-active {
    background: var(--mf-navy);
    color: #fff;
}
.mf-month:disabled {
    opacity: .4;
    cursor: default;
}

.mf-tree-line {
    display: flex;
    align-items: center;
}
.mf-tree-toggle,
.mf-tree-space {
    flex: 0 0 36px;
    width: 36px;
    height: 46px;
}
.mf-tree-toggle {
    padding: 0;
    border: 0;
    background: none;
    color: var(--mf-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.mf-tree-toggle svg {
    transition: transform .2s;
}
.mf-tree-toggle.is-open svg {
    transform: rotate(90deg);
}

/* "All filters": accordion sections */
.mf-section {
    border-bottom: 1px solid var(--mf-line);
}
.mf-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 56px;
    padding: 10px 0;
    border: 0;
    background: none;
    text-align: left;
    color: var(--mf-navy);
    cursor: pointer;
}
.mf-section-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.mf-section-title {
    font-family: 'Roboto Condensed', Roboto, Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
}
.mf-section-value {
    color: var(--mf-blue);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mf-section-value.is-empty {
    color: var(--mf-muted);
    font-weight: 400;
}
.mf-section-head[aria-expanded="true"] .mf-section-value {
    display: none;
}
.mf-section-arrow {
    flex: 0 0 auto;
    transition: transform .2s;
}
.mf-section-head[aria-expanded="true"] .mf-section-arrow {
    transform: rotate(180deg);
}
.mf-section-body {
    padding-bottom: 12px;
}
