@media(max-height: 680px) {
    .genplan-flats-info h3 {
        margin-bottom: 10px;
    }

    .genplan-flats-info-item {
        margin-bottom: 9px;
        padding-bottom: 4px;
    }
}


@media(max-height: 600px) {
    .genplan__legend {
        display: none;
    }
}

.preview__img img {
    object-fit: cover;
}

@media(max-width: 576px) {
    .genplan.short {
        height: calc(100vh - 50px);
    }
}

.modal-menu .container {
    max-width: none;
}

body.lock-scroll {
    overflow: hidden;
    padding-right: var(--scrollbar-width);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: hsl(0 0% 0% / .7);
    transition: all 300ms ease;
}

.modal-overlay[aria-hidden=true] {
    visibility: hidden;
    opacity: 0;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: grid;
    place-items: center;
    overflow: hidden;
}

.modal-wrapper {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 40rem;
    max-height: 100svh;
    overflow: auto;
    background-color: rgba(217, 211, 244);
    color: rgba(35, 30, 81);
    padding: clamp(1.5rem, calc(0.875rem + 1.563vw), 2.375rem)
        /* min: 24px, max: 38px */
        clamp(1.5rem, calc(0.429rem + 2.679vw), 3rem)
        /* min: 24px, max: 48px */
    ;

    animation: modal-open 300ms ease;
}

.modal-wrapper:has(.modal-bg-img) {
    color: #fff;
}

.modal[aria-hidden=true] .modal-wrapper {
    animation: modal-close 300ms ease;
}

.modal-bg-img {
    position: absolute;
    inset: 0;
}

.modal-bg-img img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    filter: brightness(.6);
}

.modal-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    margin-bottom: clamp(1.5rem, calc(1.143rem + 0.893vw), 2rem);
    /* min: 24px, max: 32px */
}

.modal-header button {
    cursor: pointer;
    background-color: transparent;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-left: auto;
    color: currentColor;
}

.modal-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.modal-body {
    position: relative;
    z-index: 2;
}

.modal-footer .button {
    display: inline-flex;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 99999px;
    color: #fff;
    background-color: rgba(171, 88, 101);
    transition: all 300ms cubic-bezier(.4, 0, .2, 1);
}

@media (hover: hover) {
    .modal-footer .button:hover {
        background-color: rgba(192, 130, 139);
    }
}

.promo-modal-title {
    margin-bottom: 2rem;
}

[data-focus-guard] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

@keyframes modal-open {
    from {
        opacity: 0;
        visibility: hidden;
        translate: 0 50px;
    }

    to {
        opacity: 1;
        visibility: visible;
        translate: 0;
    }
}

@keyframes modal-close {
    from {
        opacity: 1;
        visibility: visible;
        translate: 0;
    }

    to {
        opacity: 0;
        visibility: hidden;
        translate: 0 50px;
    }
}