/* ==========================================================================
   1. Map Marker Styles
   ========================================================================== */
.map_marker {
    position: relative;
    display: inline-block;
}

.map_marker_text {
    background: var(--primary);
    border: 0.1rem solid #fff;
    padding: 9px 19px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: #000;
    white-space: nowrap;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

.map_marker_tail {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
}

.map_marker_tail::after {
    content: "";
    position: absolute;
    top: -9px;
    left: -7px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid var(--primary);
}

/* ==========================================================================
   2. Layout & Search Container
   ========================================================================== */
.map_mid {
    position: relative;
    width: 100%;
    height: 90rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.map {
    position: relative;
    background-color: #fff;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    border: 0.1vw solid #222;
    box-sizing: border-box;
}

.map-container .map {
    border-left: none;
    border-right: none;
}

.mid_map_search {
    position: absolute;
    background: white;
    overflow: hidden;
    z-index: 2;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    /* 하단 우선순위 스타일 적용 */
    width: 53rem;
    height: 82rem;
    left: 6rem;
    top: 5rem;
    border-radius: 3rem;
    border: 0.1vw solid #222;
}

/* ==========================================================================
   3. Search Form Elements
   ========================================================================== */
.mid_map_search_mid {
    padding: 3rem;
    background: var(--bg-color);
    box-sizing: border-box;
}

.radio_wrap {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.radio_wrap input[type="radio"] {
    position: relative;
    appearance: none;
    outline: none !important;
    width: 50%;
    height: 6rem;
    border-radius: 1rem;
    border: 1px solid #222;
    cursor: pointer;
    transition: background 0.3s;
}

.radio_wrap input[type="radio"]:hover {
    background-color: #eee;
}
.radio_wrap input[type="radio"]:checked:hover {
    background-color: #111;
}

.radio_wrap input[type="radio"]::after {
    content: "";
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    inset: 0;
    color: #000;
    font-size: var(--bodyM);
    font-weight: bold;
}

.radio_wrap input[type="radio"]:checked {
    background-color: #000;
}

.radio_wrap input[type="radio"]:checked::after {
    color: #fff;
}

.radio_wrap #search--def::after {
    content: "직접검색";
}
.radio_wrap #search--area::after {
    content: "지역검색";
}

.search_wrap {
    position: relative;
    display: flex;
    width: 100%;
    align-items: center;
}

.mid_map_search_mid input[type="text"] {
    appearance: none;
    border: 1px solid #222;
    outline: none;
    width: 100%;
    height: 6rem;
    padding-left: 1.3vw;
    border-radius: 1rem;
    color: #444;
    background-color: #fff;
}

.mid_map_search_mid input::placeholder {
    color: #666;
}

.map_search_icon {
    position: absolute;
    right: 1vw;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.map_search_icon img {
    width: 4rem; /* 모바일 초기 스타일 참고하여 적절히 설정 */
}

.area__search--box {
    position: relative;
}

select[name="sido"] {
    appearance: none;
    width: 100%;
    height: 6rem;
    border: 1px solid #222;
    outline: none;
    border-radius: 1rem;
    padding: 0 2rem;
    box-sizing: border-box;
    background: transparent;

    &:focus {
        border: 1px solid #222;
    }
}

.drop_down_arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

/* ==========================================================================
   4. Search Results (Bottom List)
   ========================================================================== */
.mid_map_search_bottom {
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    width: 100%;
}

.mid_map_search_item {
    margin: 0 7%;
    border-bottom: 1px solid #9b9b9b;
    padding: 7% 0;
    font-size: 1vw;
    cursor: pointer;
}

.mid_map_search_item_title {
    font-size: var(--bodyXL);
    font-weight: 500;
    line-height: 1;
}

.mid_map_search_item_addres {
    margin-top: 4%;
    margin-bottom: 1%;
    font-size: var(--bodyS);
}

.mid_map_search_item_tel {
    font-size: var(--bodyS);
    line-height: 1;
}

.mid_map_search_item_btns {
    margin-top: 1vw;
    display: flex;
    justify-content: space-between;
}

.map_plus {
    margin-top: 3rem;
    transition: 0.4s;
    height: 100%;
}

.map_plus img {
    width: 100% !important;
    object-fit: contain;
}

.infor_div {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

/* ==========================================================================
   5. Popup Styles
   ========================================================================== */

/*popup*/
.fixed_popup {
    position: fixed;

    width: 100vw;
    height: 100vh;
    padding-top: 0 !important;

    top: 0;

    background: #00000099;
    z-index: 999999999999;

    display: flex;
    justify-content: center;
    align-items: center;
}

div.popup {
    width: 77rem;
    height: 32rem;
    border: 1px solid black;
    background-color: #fff;
    box-sizing: border-box;
    gap: 3vw;
    justify-content: space-between;
    border-radius: 3rem;
    overflow: hidden;

    display: flex;
}

.popup_top {
    font-size: 1.5vw;
    width: 88%;
    padding-bottom: 3%;
    text-align: center;
    border-bottom: 1px solid #0000002e;
}

.popup > p:nth-child(2) {
    font-size: 1.3vw;
    width: 88%;
    margin-top: 5%;
    padding-bottom: 2%;
    text-align: left;
}

.popup > p:nth-child(4) {
    font-size: 0.9vw;
    width: 88%;
    margin-top: 1%;
}

.popup > p:nth-child(5) {
    left: 42%;
    width: 58%;
    padding-right: 8%;
    height: 12vw;
    top: 43%;
    box-sizing: border-box;
    font-size: 0.9vw;
    overflow-y: scroll;
}

.popup_right_1st {
    color: #e3c179;
    width: 78%;
    margin-bottom: 1%;
    text-align: left;
    justify-content: flex-start;
    align-items: flex-start;
    font-size: 1.2vw;
    margin-top: -6%;
}

.popup_right > div > div:nth-child(2) {
    width: 65%;
    font-weight: 400;
    font-size: 0.85vw;
    color: #333;
}

.popup_right > div {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    color: #000;
}

.popup_right_left_txt {
    width: 18%;
    font-weight: 600 !important;
    font-size: 0.85vw !important;
    color: #000;
    position: relative;
    margin-right: 3.7%;
}

.popup_right_left_txt::after {
    content: "";
    position: absolute;
    right: 0;
    top: 31%;

    width: 1px;
    height: 50%;
    background: #c3c3c3;
}

.popup_right {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    color: #000;
    flex-grow: 1;
}

.popup_img img {
    width: 100%;
}

.fixed_popup_con {
    width: 62%;
    height: 49%;
    background-color: #000;
    top: 31%;
    left: 20%;
    border-radius: 1vw;
}

.popup_img {
    /* width: 50%; */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 0;
    height: 100%;
    overflow: hidden;
    padding-left: 5rem;
}

.popup_img img {
    width: 108%;
}

.popup_top_absol {
    width: 12.4369%;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 12%;
    left: 10%;
}

.popup_top_absol_2nd {
    width: 96.6687%;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 21%;
    left: 1.5%;
}

.popup_img_con {
    position: static !important;
    overflow: hidden;
}

.popup_right_6th_left {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000;
    right: 3%;
    bottom: 6%;
}

.popup_right_6th_left::after {
    content: "";
    width: 0%;
    height: 0.02vw;

    position: absolute;
    bottom: -0.2vw;
    left: 0;

    background: #000;
    transition: width 0.3s;
}

.popup_img_con {
    overflow: hidden;
    width: 30rem;
    height: 21.5rem;
    border-radius: 2rem;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup .popup_img_con img {
    width: auto;
	height: auto;
    object-fit: contain;
}

.popup_top_absol {
    width: 12.4369%;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 18%;
    left: 52.5%;
}

.popup_right_2nd {
    font-weight: 500;
    width: 100%;
    font-size: 1.36vw;
    box-sizing: border-box;
    font-family: "pretendard variable";
}

.popup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup_close {
    /* width: 2vw;
    height: 2vw; */
    display: flex;
    justify-content: center;
    align-items: center;
    top: 3rem;
    right: 3rem;
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.3s;
    will-change: transform;

    /* &:hover {
        transform: rotate(180deg);
    } */
}

.popup_close .absol {
    width: 60%;
    height: 2px;
    background-color: #000;
}

.popup_close .absol:nth-child(1) {
    transform: rotate(45deg);
}

.popup_close .absol:nth-child(2) {
    transform: rotate(-45deg);
}

div.popup_logo {
    width: 17.156%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1vw;
}

/* ==========================================================================
   6. Media Queries (Mobile)
   ========================================================================== */
@media (max-width: 599px) {
    .map_mid {
        height: auto;
        flex-direction: column;
    }

    .map {
        width: 100%;
        height: 60vw;
        border: solid 1.5px #000;
    }

    div.mid_map_search {
        position: static;
        width: 93%;
        height: 120vw;
        margin-top: 3vw;
        border: solid 1px #000;
        border-radius: 1.6vw;
        padding: 0;
    }

    .mid_map_search_mid {
        padding: 3vw;
        width: 100%;
    }

    .mid_map_search_mid input {
        height: 10vw;
        font-size: var(--bodyM);
    }

    .map_search_icon {
        width: 4vw;
        right: 8vw;
    }

    .mid_map_search_item {
        font-size: 3vw;
        margin: 0 3vw;
        padding: 6vw 0;
    }

    .mid_map_search_item_title,
    .mid_map_search_item_addres,
    .mid_map_search_item_tel {
        width: 74vw;
    }

    .mid_map_search_item_title {
        font-size: 4vw;
    }
    .mid_map_search_item_addres,
    .mid_map_search_item_tel {
        font-size: 3.3vw;
    }

    .mid_map_search_bottom {
        height: 100%;
    }

    /* Mobile Popup */
    div.popup {
        width: 90%;
        height: auto;
        flex-direction: column;
        justify-content: flex-start;
        gap: 4vw;
        border-radius: 5rem;
        padding-bottom: 3rem;
    }
    .popup_img_con {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    .popup_img {
        width: 100%;
        height: 42%;
        padding-left: 0;
    }

    .popup_right {
        width: 100%;
        align-items: center;
        margin-top: 0;
        flex-grow: initial;
    }

    .popup_right_2nd {
        font-size: 4.56vw;
        font-weight: 600;
        text-align: center;
    }

    .popup_right > div {
        justify-content: center;
    }

    .popup_right_left_txt {
        width: 21%;
        font-size: 3.5vw !important;
    }

    .popup_right > div > div:nth-child(2) {
        width: 60%;
        font-size: 3.5vw;
    }

    .popup_close {
        width: 12vw;
        /* height: 7.5vw; */
        background: #fff;

        > img {
            width: 100% !important;
        }
    }

    .map_plus  {
        position: absolute;
        right: 1rem;
        top: 3rem;
        height: auto;
        margin-top: 0;
    }
}
