html {
    scrollbar-gutter: stable;
}

.location-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1301;
    width: calc(100% - 60px);
    max-width: 421px;
    max-height: calc(100dvh - 48px);
    overflow: hidden;
    background-color: #ffffff;
    border-radius: 20px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -46%) scale(0.98);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

body.location-modal-is-open {
    overflow: hidden;
}

body.location-modal-is-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1300;
    background-color: rgba(0, 0, 0, 0.5);
}

.location-modal.location-modal--open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.location-modal__top {
    display: flex;
    justify-content: space-between;
    padding: 20px 24px 5px 24px;
    align-items: center;
}

.location-modal__title {
    margin: 0;
    padding: 0;
    color: #2D532D;
    font-family: "Epilogue", "Poppins", sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 1px;
}

/* list ========================================== */

.location-modal__list {
    max-height: calc(100dvh - 130px);
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
    color: #171200;
    font-size: 16px;
    line-height: 150%;
}

.location-modal__item {
    margin: 0;
    padding: 12px 16px;
    border-top: 1px solid #d8ddd8;
}

.location-modal__item:first-child {
    border-top: 0;
}

.location-modal__link {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 40px;
    padding-left: 44px;
    color: #231f20;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.location-modal__link::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 50%;
    width: 24px;
    height: 24px;
    background-color: #2d532d;
    transform: translateY(-50%);
    mask: url("../images/location.svg") center / contain no-repeat;
    -webkit-mask: url("../images/location.svg") center / contain no-repeat;
}

.location-modal__link:hover,
.location-modal__link:focus-visible {
    background-color: #E6EAE6;
    border-radius: 6px;
    font-weight: 600;
}

.location-modal__close:focus-visible,
.location-modal__link:focus-visible {
    outline: 2px solid #2d532d;
    outline-offset: -2px;
}

/* close-button ============================= */
.location-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: transparent;
    color: #231f20;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.location-modal__close::before,
.location-modal__close::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 1px;
    border-radius: 999px;
    background-color: currentColor;
}

.location-modal__close::before {
    transform: rotate(45deg);
}

.location-modal__close::after {
    transform: rotate(-45deg);
}

.location-modal__close:hover,
.location-modal__close:focus-visible {
    background-color: #e6e9e7;
}

/*================================================================*/
@media (max-width: 600px) {

    .location-modal__title {
        font-size: 18px;
    }

    .location-modal__list {
        font-size: 16px;
    }
}
