body {
    background-color: #fff;
}

header .logo-container {
    width: 13%;
}

header .logo-container img {
    height: 35px;
    width: auto;
}

.map-canvas {
    min-height: inherit;
    position: relative;
    z-index: 0;
}

/* results list */
.list-result-hotel {
    width: 24.5rem;
    max-height: 88.5dvh;
    overflow: hidden;
}

.map-results {
    background-color: #fff;
}

.map-results__count {
    min-width: 0;
    white-space: nowrap;
}

.map-results__list {
    min-height: 0;
    padding-left: 0.15rem;
}

.map-results__list::-webkit-scrollbar {
    width: 4px;
}

.map-results__list::-webkit-scrollbar-thumb {
    background: #e6e8ef;
    border-radius: 999px;
}

.map-results__sentinel {
    min-height: 1px;
}

/* hotel card */
.map-hotel-card {
    width: 22.5rem;
}

.map-hotel-card:hover {
    border-color: var(--primary-30) !important;
}

.map-hotel-card__media {
    width: 6.5rem;
    height: 6.5rem;
}

.map-hotel-card__image {
    background: #eef3f7;
}

.map-hotel-card__image img{
    transform: scale(1.1);
}

.map-hotel-card__title {
    font-size: 1rem;
}

.map-hotel-card__title:hover {
    color: var(--cl-primary);
}

.map-hotel-card__price-value {
    font-size: 0.875rem;
}

.map-hotel-card__price-of{
    font-size: 0.75rem;
}

/* city select (reserve form) */
.map-city-select .dropdown {
    position: relative;
    width: 100%;
}

.btn-toggle-panel-list-result {
    --map-toggle-size: 2.625rem;
    top: 4%;
    right: 42.5rem;
    left: auto;
    z-index: 5;
    width: var(--map-toggle-size);
    height: var(--map-toggle-size);
    color: #374151;
    box-shadow: 0 2px 10px rgb(15 23 42 / 12%);
    transform: translate(50%, -50%);
    transition: right 0.5s ease, transform 0.5s ease;
}

.btn-toggle-panel-list-result:active {
    transform: translate(50%, -50%) scale(0.96);
}

.btn-toggle-panel-list-result__icon {
    transition: transform 0.5s ease;
}

.btn-toggle-panel-list-result.is-collapsed .btn-toggle-panel-list-result__icon {
    transform: rotate(180deg);
}

.btn-toggle-panel-list-result.is-collapsed ~ .map-content .map-show-hotels-link{
    margin: 0 1rem 0.8rem 0;
}

.btn-toggle-panel-list-result.is-collapsed {
    right: 20.25rem;
}

.reservation-form .form-items .form-item .map-city-select__toggle {
    position: relative;
    align-items: center;
    width: 100%;
    padding: 0 0.75rem 0 2rem;
    background-color: #fff;
    color: #1f2937;
    font-size: calc(var(--fs-md) - 0.05rem);
    font-weight: 500;
    text-align: right;
    cursor: pointer;
}

.reservation-form .form-items .form-item:not(.form-item-pair) .input-container.map-city-select__toggle:hover,
.reservation-form .form-items .form-item:not(.form-item-pair) .input-container.map-city-select__toggle:focus,
.reservation-form .form-items .form-item:not(.form-item-pair) .input-container.map-city-select__toggle:focus-within,
.reservation-form .form-items .form-item:not(.form-item-pair) .input-container.map-city-select__toggle.show {
    border: var(--input-container-border);
    box-shadow: none;
    outline: none;
}

.map-city-select__toggle::after {
    content: "";
    position: absolute;
    left: 11px;
    top: 50%;
    width: 0.6rem;
    height: 0.6rem;
    border-right: 1.5px solid #7d8694;
    border-bottom: 1.5px solid #7d8694;
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s ease;
    pointer-events: none;
}

.map-city-select__toggle.show::after {
    transform: translateY(-30%) rotate(225deg);
}

.map-city-select__current {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.map-city-select__menu {
    width: 100%;
    min-width: 16rem;
    margin-top: 0.4rem !important;
    padding: 0.5rem;
    border: 1px solid #eef0f3;
    border-radius: 0.875rem;
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.16);
    z-index: 1060;
}

.map-city-select__search {
    position: relative;
    margin-bottom: 0.4rem;
}

.map-city-select__search svg {
    position: absolute;
    right: 0.7rem;
    top: 50%;
    width: 1.05rem;
    height: 1.05rem;
    color: #9aa0ae;
    transform: translateY(-50%);
    pointer-events: none;
}

.map-city-select__search input {
    width: 100%;
    height: 2.4rem;
    padding: 0 2.2rem 0 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    background: #f9fafb;
    font-size: 0.875rem;
    color: #1f2937;
    outline: none;
    box-shadow: none;
}

.map-city-select__search input:hover,
.map-city-select__search input:focus {
    border-color: #e5e7eb;
    background: #f9fafb;
    outline: none;
    box-shadow: none;
}

.map-city-select__list {
    max-height: 16rem;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.map-city-select__list li[hidden] {
    display: none;
}

.map-city-select__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: none;
    border-radius: 0.6rem;
    background: transparent;
    color: #1f2937;
    font-size: 0.875rem;
    text-align: right;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.map-city-select__option:hover,
.map-city-select__option:focus-visible {
    background: #fff7ef;
    color: var(--cl-primary, #f97a00);
    outline: none;
}

.map-city-select__option.is-active {
    background: #fff0e6;
    color: var(--cl-primary, #f97a00);
    font-weight: 700;
}

.map-city-select__name {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.map-city-select__count {
    flex-shrink: 0;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 500;
}

.map-city-select__option.is-active .map-city-select__count,
.map-city-select__option:hover .map-city-select__count {
    background: #ffe2c7;
    color: var(--cl-primary, #f97a00);
}

.map-city-select__empty {
    margin: 0;
    padding: 1rem 0.5rem;
    color: #9aa0ae;
    font-size: 0.85rem;
    text-align: center;
}

.map-city-select__sentinel {
    height: 1px;
    margin: 0;
    padding: 0;
    list-style: none;
    pointer-events: none;
}

/* map controls */
.map-show-hotels-link {
    font-weight: 600;
    color: #1f2937;
    bottom: 0;
    border-color: #e5e7eb !important;
    z-index: 5;
    margin: 0 2.5rem 0.8rem 0;
}

.map-show-hotels-link:hover,
.map-show-hotels-link:focus {
    color: var(--cl-primary, #f97a00);
    border-color: #ffc28a !important;
    background-color: #fff;
}


.leaflet-container {
    width: 100%;
    height: 100%;
    background: #eef3f7;
    z-index: 0;
}

.leaflet-control-zoom.leaflet-bar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.leaflet-control-zoom.leaflet-bar a,
.leaflet-control-zoom.leaflet-bar a:hover,
.leaflet-control-zoom.leaflet-bar a:focus {
    width: 2.25rem;
    height: 2.25rem;
    line-height: 2.15rem;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: #fff;
    color: #1f2937;
    font-size: 1.15rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.12);
    text-indent: 0;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.leaflet-control-zoom.leaflet-bar a:first-child,
.leaflet-control-zoom.leaflet-bar a:last-child {
    border-radius: 50%;
}

.leaflet-control-zoom.leaflet-bar a:hover,
.leaflet-control-zoom.leaflet-bar a:focus {
    color: #f97a00;
    border-color: #ffc28a;
    background: #fff;
    box-shadow: 0 6px 16px rgba(249, 122, 0, 0.18);
}

.leaflet-control-zoom.leaflet-bar a.leaflet-disabled,
.leaflet-control-zoom.leaflet-bar a.leaflet-disabled:hover {
    color: #c4c9d4;
    border-color: #eef0f4;
    background: #f7f8fb;
    box-shadow: none;
    cursor: default;
}

/* markers */
.hotel-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cl-primary, #f97a00);
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.hotel-cluster__count {
    pointer-events: none;
}

.hotel-point {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #00000024;
    box-shadow: -2px 2px 5px 0 #00000038;
    border-radius: 8px;
    color: var(--text-dark);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.hotel-point.is-highlighted {
    z-index: 1000 !important;
    border-color: var(--cl-primary, #f97a00);
    background: #fff7ef;
    box-shadow: 0 4px 14px rgba(249, 122, 0, 0.35);
    transform: scale(1.08);
}

.hotel-point::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--cl-primary, #f97a00);
    border-right: 2px solid #ffc28a;
    border-bottom: 2px solid #ffc28a;
    transform: translate(-50%, -5px) rotate(45deg);
}

.hotel-point__price {
    display: inline-flex;
    align-items: baseline;
    gap: 0.2rem;
    direction: rtl;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    white-space: nowrap;
}

.hotel-point__value {
    direction: ltr;
}

.hotel-point__currency {
    font-size: 0.6rem;
    font-weight: 500;
}

/* popup */
.map-hotel-popup {
    direction: rtl;
}

.map-hotel-popup .leaflet-popup-content-wrapper,
.map-hotel-popup .leaflet-popup-tip {
    background: transparent;
    box-shadow: none;
    border: 0;
    padding: 0;
}

.map-hotel-popup .leaflet-popup-content-wrapper {
    height: auto;
}

.map-hotel-popup .leaflet-popup-content {
    margin: 0;
    padding: 9px 10px;
}

.map-hotel-popup .leaflet-popup-content .map-hotel-card {
  width: 20rem;
}

.map-hotel-popup .leaflet-popup-close-button {
    display: none;
}

.map-hotel-popup .map-hotel-card {
    box-shadow: 0 0 16px -2px #00000070;
}

.leaflet-popup {
    margin-bottom: unset;
}

.leaflet-popup-content-wrapper {
    height: 10rem;
    text-align: right;
}

.sidebar-filter .filter-box.sidebar.filter-panel {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.toolbar-filter {
    top: 6.05rem;
    inset-inline-start: 1rem;
}

.toolbar-filter .sort-select {
    margin-inline-start: 0;
}

.toolbar-filter .sort-select__toggle {
    background-color: #fff;
}

/* reserve search form overrides */
.reservation-form .form-items .form-item .input-container.disabled input {
    visibility: unset;
}

/* card hotel empty */
.hotel-empty-image {
    width: 8.125rem;
    height: 8.125rem;
    background-image: url('/assets/images/icons/hotel-not-found.webp');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

@media (max-width: 991.98px) {
    header .logo-container img {
        height: 30px;
    }

    .sidebar-filter {
        width: 0;
        min-width: 0;
        height: 0 !important;
        padding: 0;
        overflow: visible;
    }

    /* Higher specificity than desktop map rules; keep filters.css offcanvas behavior */
    .sidebar-filter .filter-box.sidebar.filter-panel {
        position: fixed;
        inset: 0 auto auto 0;
        width: 100vw;
        max-width: none;
        min-width: 0;
        height: 100dvh;
        max-height: none;
        flex: none;
        transform: translateX(-100%);
        transition: transform 0.5s ease;
        z-index: 9999999;
        border: none;
        border-radius: 0;
    }

    .sidebar-filter .filter-box.sidebar.filter-panel.active {
        transform: translateX(0);
    }

    .sidebar-filter .filter-box.sidebar.filter-panel .filter-panel__body {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden auto;
    }

    .map-mobile-summary {
        position: relative;
        z-index: 4;
    }

    .map-reserve-offcanvas {
        width: min(100%, 22.5rem);
    }

    .map-reserve-offcanvas .map-reserve-form-root {
        margin: 0;
    }

    .map-reserve-offcanvas .reservation-form-wrapper {
        margin: 0 !important;
    }

    .map-reserve-offcanvas .form-items {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .map-reserve-offcanvas .form-item {
        width: 100%;
        min-width: 0;
    }

    .map-reserve-offcanvas .form-item.submit {
        margin-top: 0.25rem;
    }

    .reservation-form .form-items .form-item.submit {
        display: none;
    }

    .list-result-hotel {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 1rem;
        width: auto;
        max-height: none;
        margin-inline: 0;
        overflow: hidden;
    }

    .list-result-hotel .map-results {
        background-color: transparent;
        min-width: 0;
    }

    .list-result-hotel:has(.hotel-empty-card ) {
     left: 1rem;
    }

    .map-content {
        height: 100dvh;
    }

    .map-content .map-canvas {
        min-height: 0;
    }

    .map-results {
        border: unset !important;
    }

    .map-results__list.swiper {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        padding-inline: 0;
    }

    .map-results__list .swiper-slide {
        width: min(22.5rem, calc(100vw - 3.5rem));
        height: auto;
        flex-shrink: 0;
    }

    .map-results__list .swiper-slide.map-results__sentinel {
        width: 7.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .map-results__list .map-hotel-card {
        width: 100%;
    }

    .map-show-hotels-link {
        bottom: 8.3rem;
        margin: 0 1rem 0.8rem 0;
    }

    .map-hotel-card__title {
        font-size: 0.875rem;
    }

    .hotel-empty-image{
        height: 7.125rem;
    }
}

@media (min-width: 992px) {
    .list-result-hotel {
        --map-list-notch-radius: 25px;
        transition: width 0.5s ease, opacity 0.2s ease;
    }

    .list-result-hotel:not(.is-collapsed) {
        margin-left: calc(-1 * var(--map-list-notch-radius));
        -webkit-mask-image: radial-gradient(
            circle var(--map-list-notch-radius) at 0% 4%,
            transparent 0 var(--map-list-notch-radius),
            #000 calc(var(--map-list-notch-radius) + 1px)
        );
        mask-image: radial-gradient(
            circle var(--map-list-notch-radius) at 0% 4%,
            transparent 0 var(--map-list-notch-radius),
            #000 calc(var(--map-list-notch-radius) + 1px)
        );
    }

    .list-result-hotel.is-collapsed {
        width: 0 !important;
        min-width: 0;
        margin-left: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .sidebar-filter {
        display: flex;
        flex-direction: column;
        height: 88.5dvh !important;
        width: 18rem;
        box-sizing: border-box;
    }

    .sidebar-filter .filter-box.sidebar.filter-panel {
        flex: 1 1 auto;
        min-height: 0;
        height: 100%;
        width: 100%;
        max-width: none;
        min-width: 0;
        position: relative;
        top: auto;
    }

    .sidebar-filter .filter-box.sidebar.filter-panel .filter-panel__body {
        flex: 1 1 auto;
        min-height: 0;
    }

    .sidebar-filter .filter-box.filter-panel .filter-panel__chips.box-stars-hotels {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-box.filter-panel .filter-panel__footer{
        display: none;
    }

    .map-results__list.swiper {
        overflow: auto !important;
        height: 100%;
        scrollbar-width: none;
    }

    .map-results__list .swiper-wrapper {
        flex-direction: column !important;
        transform: none !important;
        height: auto !important;
        gap: 0.85rem;
    }

    .map-results__list .swiper-slide {
        width: 100% !important;
        margin-left: 0 !important;
    }
}
