/* ===================================
   챗봇 CSS
   =================================== */
/* 챗봇 버튼 css */
.chatbot-btn{
    position: fixed;
    bottom:30px;
    right:80px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content : center;
    transition : all 0.3s ease;
    z-index: 5000;
    border: 1px solid transparent;
    background-origin: border-box;
    background-image: linear-gradient(147deg, #ffffff 19.76%, #71D7FF 208.41%), linear-gradient(225deg, #007AFF, #00CAE0);
    background-clip: content-box, border-box;
}

.chatbot-btn:hover{
    transform: scale(0.95);
}

.chatbot-btn.active {
    background-image: linear-gradient(#FFFFFF, #FFFFFF), linear-gradient(225deg, #007AFF, #FDFDFD);
}

.chatbot-btn img {
    width: 42px;
    height: 39px;
}

.chatbot-btn span {
    color: #007AFF;
    font-weight: 700;
}

/* X 아이콘 */
.close-icon{
    display: none;
    color: white;
    font-size: 28px;
    font-weight : bold;

}
.send-btn {
    width: 51px;
    height: 51px;
    background: #007aff;
    padding: 5px;
    border-radius: 0 12px 12px 0;
    padding-left: 10px;
}

/* 기존 챗봇 E*/

/* 챗봇 닫기 버튼 (header_img 위치) */
.chat_head .title .chatbot-close-btn {
    position: absolute;
    right: 10px;
    top: 0px;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: none;
    background: #ef4444;
    color: #fff;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}
.chat_head .title .chatbot-close-btn:hover {
    background: #dc2626;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* 신규 챗봇 S */
.chatbot-window {
    border-radius: 12px;
    display: none;
    max-width: 500px;
    background-color: #fff;
    z-index: 5000;
    position: fixed;
    bottom: 130px;
    right: 80px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    flex-direction: column;
}
.chatbot-window.active{
    display: flex;
    animation: slideUp 0.3s ease;
}
.chat_head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 20px 25px 0;
  position: relative;
  background-color: #ffffff;
  border-radius: 12px;
  flex: 0 0 auto;
  position: relative;
}

.chat_head .title {
  width: 100%;
  text-align: left;
  line-height: 32px;
  height: fit-content;
  font-weight: 700;
  font-size: 23px;
  position: relative;
  letter-spacing: 0;
  color: #0e0f11;
  margin-bottom: 20px;
}
.chat_head .title .header_img {
  position: absolute;
  right: 10px;
  top: 0px;
  width: 5rem;
  height: 5rem;
}
.chat_body .explain {
  text-align: left;
  font-weight: 500;
  color: #0e0f11;
  font-size: 15px;
  line-height: 22px;
  height: fit-content;
  padding: 0 25px 20px;
  background: #fff;

}
.chat_body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  background-color: #e2efff;
  border-radius: 0px 0px 12px 12px;
}
.chat_body .chatbot_img {
    width: 10rem;
    height: 8rem;
    position: absolute;
    top: 50px;
    z-index: 10;
    left: 0;
}
.chat_body .content_div {
  overflow-y: scroll;
  gap: 16px;
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: 40vh;
}
.chat_body .content_div .bubble_div {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  flex: 0 0 auto;
  height: 100%;
  width: 100%;
  padding-top: 30px;
  padding-right: 10px;
}
.chat_body .content_div .bubble_div .chat_start {
  padding-left: 1rem;
  position: relative;
}
.chat_body .content_div .bubble_div .chat_start img {
  top: 0.5rem;
  left: 3.5rem;
  position: absolute;
  width: 4.5rem;
  height: 2rem;
}

.chat_body .chat_item {
  max-width: 70%;
  position: relative;
}
.chat_body .chat_item div {
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 1.2rem;
}
.chat_body .chat_item .result-title {
    font-weight: 700;
    font-size: 1.5rem;
}
.chat_body .chat_item.user {
  align-self: flex-end;
}
.chat_body .chat_item.bot {
  align-self: flex-start;
}
.chat_body .chat_item.user > div {
  background-color: #007aff;
  color: #fff;
}
.chat_body .chat_item.bot .msg {
  background-color: #fff;
  margin-top: 0.5rem;
  margin-left: 6rem;
  padding: 12px 16px;
  border-radius: 18px;
  word-wrap: break-word;
}
.chat_body .chat_item.bot .msg.status_msg {
  color: #a0a0a0;
}
.chat_body .chat_item.bot .msg .result-info {
    padding: 3px 2px;
    text-align: left;
    /* 텍스트 안에 있는 공백·줄바꿈·탭을 그대로 보이게 함 */
    white-space: pre-wrap;   /* 줄바꿈은 <br> 없이도 적용 */
    word-break: break-word;  /* 긴 단어/URL도 자동 래핑 */
}
.chat_body .chat_item .msg .result-info.price {
    color: #667eea !important;
    font-weight: bold;
    margin-top: 5px;
    font-size: 1.4rem;
}
.chat_body .chat_item b {
    font-weight: 700;
}
.chat_body .chat_item h2 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 5px;
}
.chat_body .chat_item .msg .result-info table {
    margin: 5px;
    border: 1px solid #9da7ba;
    border-radius: 5px;
}
.chat_body .chat_item .msg .result-info table thead {
    background: #c7d7df;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}
.chat_body .chat_item .msg .result-info table th, .chat_body .chat_item .msg .result-info table td {
    border: 1px solid #9da7ba;
}
.chat_body .chat_item.bot img {
  top: 1rem;
  left: 2.5rem;
  position: absolute;
  width: 4.5rem;
  height: 2rem;
}
.chat_footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  width: 100%;
  flex: 0 0 auto;
}
.chat_footer .button_div {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    justify-content: center;
}
.chat_footer .button_div .chat_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  flex: 0 0 auto;
  border-radius: 20px;
  border: 1px solid;
  font-weight: 700;
  font-size: 14px;
  text-align: right;
  line-height: 22px;
  position: relative;
  width: 30%;
  border-color: #007aff;
  color: #007aff;
  cursor: pointer;
  justify-content: space-evenly;
}
.chat_footer .button_div .chat_btn.black {
  background-color: #001a3b;
  color: #ffffff;
  border-color: #001a3b;
}
.chat_footer .button_div .chat_btn img {
    width: 22px;
    height: 22px;
}
.chat_footer .search_div {
  display: flex;
  height: 56px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0px 10px 20px;
  position: relative;
  align-self: stretch;
  width: 100%;
  background-color: #ffffff;
  border-radius: 12px;
  border: 3px solid;
  border-color: #007aff;
}
.chat_footer .search_div #chatbotInput {
    font-weight: 400;
    color: #565656;
    font-size: 1.2rem;
    line-height: 30px;
    height: 2vh;
    width: fit-content;
    width: 100%;
    border: none;
}
.chat_footer .search_div #chatbotInput:focus-visible {
  outline: none;
}
.chat_footer .search_div img {
    margin-right: -2px;
}
.blue_txt {
  color: #007aff;
}
.text_warning {
  color: #f6632d;
  font-size: 12px;
  text-align: center;
}
/* 신규 챗봇 E */
/*기본상태 - 우측 패널이 닫혀있을 때  */
#app.collapsed-right .chatbot-btn,
#app.collapsed-right .chatbot-window{
    right: 80px;
}
/* 우측 패널이 열렸을 때  */
#app:not(collapsed-right) .chatbot-btn,
#app:not(collapsed-right) .chatbot-window{
    right: 430px;
}



/*우측 패널 결과 스타일*/
.search-results-panel{
    height: 100%;
    display : flex;
    flex-direction: column;
    background: #f5f5f5;

}

[data-theme="dark"] .search-result-panel{
    background : #111;
}

.panel-header {
    padding: 20px;
    background : linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;

}


[data-theme="light"] .panel-header{
    background : linear-gradient(135deg, #6B8DD6 0%, #8E37d7 100%);
}

.panel-header h2{
    font-size: 18px;
    margin: 0;
}

.close-panel-btn{
    background : rgba(255, 255, 255, 0.2);
    border : none;
    color: white;
    width : 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
}

.close-panel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform : rotate(90deg);

}

.results-list{
    flex: 1;
    overflow-y : auto;
    padding: 20px;

}

.result-item{
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    gap : 15px;
    transition : all 0.3s;
    cursor: pointer;
}

.result-item:hover{
    transform : translateY(-2px);
    box-shadow: 0 4px 12px rgba( 0, 0, 0, 0.4);
}

.result-number{
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius : 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;

}

.result-content{
    flex: 1;
}

.result-content .result-title{
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0 0 10px 0;

}
.result-content .result-location{
    font-size: 13px;
    color: #666;
    margin: 5px 0 ;

}

.result-content .result-info{
    font-size : 13px;
    color: #777;
    margin: 5px 0;
}

.result-content .result-price{
    font-size: 15px;
    font-weight: bold;
    color: #667eea;
    margin: 10px 0 0 0 ;


}



/*슬라이더 컨테이너*/
.layer-swipe-container{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/*세로 슬라이더 바*/

.swipe-slider{

    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: rgba(255, 255, 255,0.8);
    cursor: ew-resize;
    pointer-events: auto;
    z-index: 1001;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);

}

/*슬라이더 핸들*/
.swipe-handle{
    position: absolute;
    top:50%;
    left:50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;


}

.swipe-handle::before{

    content: '↔';
    color: #333;
}


.msg-bubble{
    cursor : pointer;
    transition: all 0.3s ease;

}


/* 좌/우 토글 버튼 */
.edge-btn {
    position: absolute;
    top: calc(50% + 25px);
    transform: translateY(-50%);
    width: 28px;
    height: 48px;
    border: none;
    cursor: pointer;
    background: white;
    color: black;
    border-radius: 6px;
    z-index: 2001;
    transition: left var(--anim,250ms ease), right var(--anim,250ms ease);
}

.edge-btn:hover { background: #e5e7eb; }
.wrapper.collapsed-left  .edge-btn.left { left: 0px; }
.wrapper:not(.collapsed-left) .edge-btn.left { left: 360px; }
.wrapper.collapsed-right       .edge-btn.right { right: 0.25rem; }
.wrapper:not(.collapsed-right) .edge-btn.right { right: 360px; }
.wrapper.collapsed-left  .edge-btn.left::after  { content: '❯'; }
.wrapper:not(.collapsed-left)  .edge-btn.left::before  { content: '❮'; left: 360px; }
.wrapper.collapsed-right .edge-btn.right::after { content: '❮'; }
.wrapper:not(.collapsed-right) .edge-btn.right::after { content: '❯'; }

#left {

    width: 360px;
    left: 0;
}

#left, #right {
    position: absolute;
    top: 120px;
    bottom: 0;
    background: white;
    color: black;
    overflow: auto;
    transition: transform 250ms ease;
    z-index: 1050;
}
#markerDetailView2{
    display:none;

}


.sales_body .pointer_detail{

}

.chat_item.bot .bot-actions{
    margin-top : 8px;
    display: flex;
    gap: 8px;
}

.chat_item.bot .rate{
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    cursor: pointer;
    padding: 0;
}
.bot-feedback { height: max-content; margin-left: 6rem;}
.bot-feedback .rate.like { background-image: url('/main/images/chatbot/thumsup.png'); width: 35px; height: 35px; background-size: contain; background-position: center;}
.bot-feedback .rate.like:hover:not([disabled]) { background-image: url('/main/images/chatbot/thumsup_on.png');}
.bot-feedback .rate.selected.like{ background-image: url('/main/images/chatbot/thumsup_on.png');}
.bot-feedback .rate.dislike { background-image: url('/main/images/chatbot/thumsdown.png'); width: 35px; height: 35px; background-size: contain; background-position: center;}
.bot-feedback .rate.dislike:hover:not([disabled]) { background-image: url('/main/images/chatbot/thumsdown_on.png');}
.bot-feedback .rate.selected.dislike { background-image: url('/main/images/chatbot/thumsdown_on.png');}
.bot-feedback .rate[disabled] { cursor: no-drop}


/* 반응형 */
@media screen and (max-width: 1200px) {
    .chatbot-window {bottom: 115px;}
}

@media screen and (max-width:860px) {
    .chatbot-btn {
        bottom: 30px;
        right: 10px;
        width: 70px;
        height: 70px;
        background-image: linear-gradient(#ffffff, #ffffff), linear-gradient(225deg, #007AFF, #00CAE0);
        background-clip: content-box, border-box;
        background-origin: border-box;
        border: 1px solid transparent;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    .chatbot-btn.active {
        background-image: linear-gradient(#ffffff, #ffffff), linear-gradient(225deg, #007AFF, #00CAE0);
    }
    .chatbot-btn span {
        color: #007AFF;
        font-weight: 700;
        font-size: 12px;
    }
    /* 챗봇 창 모바일 전체화면 */
    .chatbot-window {
        margin: 0;
        right: 0;
        bottom: 0;
    }
    .chatbot-window.active {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100dvh;
        max-width: 100%;
        border-radius: 0;
        z-index: 7000;
        /* Android Chrome GPU 플리커 방지: 단일 합성 레이어로 격리 */
        will-change: transform;
        contain: layout style paint;
    }
    .chatbot-window.active .chat_head {
        border-radius: 0;
    }
    .chatbot-window.active .chat_head .title .chatbot-close-btn {
        right: 2px;
        top: 2px;
    }
    .chatbot-window.active .chat_body {
        border-radius: 0;
        flex: 1;
        min-height: 0;
    }
    .chatbot-window.active .chat_body .content_div {
        height: auto;
        flex: 1;
    }
    .chat_footer .button_div .chat_btn img {width: 15px; height: 15px;}
}
@media screen and (max-width:380px) {
    .chatbot-btn { bottom: 20px; right: 10px; }
    .chat_head .title {font-size: 20px; margin-bottom: 10px;}
    .chat_body .explain {font-size: 13px;}
    .chat_body .chat_item.bot .msg { padding: 10px 16px;}
    .chat_body .content_div .bubble_div .chat_start img {left: 2.5rem;}
    .chat_body .chat_item.bot .msg {margin-left: 4.3rem;}
    .chat_footer .button_div .chat_btn {padding: 10px 12px;}
}


