@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Thin.woff2') format('woff2');
    font-weight: 100;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Light.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Black.woff2') format('woff2');
    font-weight: 900;
    font-display: swap;
}
html,body{font-size: 0.95rem; line-height: 1.3;}
/*.graph-chatContainer{width: 500px; position: fixed; bottom: 40px; left: 34px; z-index: 2; border-radius: 13px; padding: 14px; box-sizing: border-box; box-shadow: 0px 4px 10px rgba(0,0,0,0.3); display: none; background: linear-gradient(180deg, #F3EFFF 0%, #FFFFFF 100%);}
.graph-chatContainer.chat-open { display: block; }*/
.chatContainer{width: 500px; position: fixed; bottom: 40px; left: 34px; z-index: 2; border-radius: 13px; padding: 14px; box-sizing: border-box; box-shadow: 0px 4px 10px rgba(0,0,0,0.3); display: none; background: linear-gradient(180deg, #F3EFFF 0%, #FFFFFF 100%);}
.graph-chatContainer{
    width: 500px; 
    max-width: 90vw; /* 모바일 대응 */
    position: fixed; 
    bottom: 40px; 
    left: 34px; 
    z-index: 2; 
    border-radius: 13px; 
    padding: 14px; 
    box-sizing: border-box; 
    box-shadow: 0px 4px 10px rgba(0,0,0,0.3); 
    background: linear-gradient(180deg, #F3EFFF 0%, #FFFFFF 100%);
    /* 애니메이션 설정 */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.7s ease, transform 0.3s ease, visibility 0.7s;
}
.graph-chatContainer.chat-open { 
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* 📏 리사이즈 핸들 스타일 */
.graph-resize-handle-nw {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 20px;
    height: 20px;
    cursor: nw-resize;
    z-index: 10;
    /* background: rgba(255, 0, 0, 0.3); 테스트용 색상 */
}

.graph-resize-handle-ne {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    cursor: ne-resize;
    z-index: 10;
    /* background: rgba(0, 0, 255, 0.3); 테스트용 색상 */
}

/* 🖱️ 드래그 중일 때 iframe/canvas 이벤트 가로채기 방지 */
body.graph-resizing {
    user-select: none; /* 텍스트 선택 방지 */
    cursor: nwse-resize !important;
}
body.graph-resizing iframe,
body.graph-resizing canvas,
body.graph-resizing embed,
body.graph-resizing object {
    pointer-events: none !important; /* 마우스 이벤트 무시 */
}

/* 📱 모바일 반응형 */
@media (max-width: 768px) {
    .graph-chatContainer {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100% !important;
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        top: 0 !important;
        border-radius: 0 !important;
        padding: 10px !important;
    }
    
    .graph-chatContainer .Chat-inner {
        /* height: calc(100% - max(50px, env(safe-area-inset-top))) !important;
        max-height: calc(100vh - max(50px, env(safe-area-inset-top)))!important; */
        height: 100% !important;
        max-height: 100% !important;
    }
    
    #graph-chatbot-toggle-button {
        bottom: 80px !important;
        right: 20px !important;
        width: 56px !important;
        height: 56px !important;
    }
    
    #graph-chatbot-toggle-button img {
        width: 36px !important;
        height: 36px !important;
    }
}

/* 보라색 테마 */
.graph-chatContainer#vst{background: linear-gradient(156deg,rgba(255, 255, 255, 1) 0%, rgba(225, 213, 255, 1) 100%);}

.graph-chatContainer .Chat-inner{width: 100%; position: relative; display: flex; flex-direction: column; height: 720px; max-height: 80vh;}

/* New Header Styles */
.graph-chat-header {
    display: flex;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #EAEAEA;
    margin-bottom: 10px;
}
.graph-header-logo img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}
.graph-header-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-left: 10px;
    flex-grow: 1;
}
.graph-btn_close {
    background: none;
    border: none;
    cursor: pointer;
}
.graph-btn_close img {
    width: 24px;
    height: 24px;
}

/* 중앙 배치 환영 화면 */
.graph-welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    text-align: center;
    padding: 40px 20px;
}
.graph-welcome-screen.hidden {
    display: none;
}
.graph-welcome-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8DAFF 0%, #D4BDFF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(169, 132, 212, 0.3);
}
.graph-welcome-icon img {
    width: 70px;
    height: 70px;
}
.graph-welcome-text h2 {
    font-size: 16px;
    font-weight: 400;
    color: #666;
    margin-bottom: 10px;
}
.graph-welcome-text h1 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}
.graph-welcome-suggestions {
    margin-top: 30px;
    font-size: 14px;
    color: #888;
    margin-bottom: 15px;
}

.graph-Chat-inner .con{position: relative; width: 100%;}

.graph-askBox{
    text-align: right;
    margin-top: auto;
}

.graph-askBox .main_copy{margin-bottom: 10px;}
.graph-askBox .main_copy h1{font-size: 18px; font-weight: 500;}
.graph-askBox .listBox{width: 100%; position: relative;}
.graph-askBox .faq-header{display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; cursor:pointer;float:right;}
.graph-askBox .faq-header h3{font-size: 14px; font-weight: 600; color: #333; margin: 0;}
.graph-askBox .faq-toggle-btn{background: none; border: none; cursor: pointer; padding: 4px; display: flex; align-items: center; transition: transform 0.3s;}
.graph-askBox .faq-toggle-btn.collapsed{transform: rotate(180deg);}
.graph-askBox .faq-toggle-btn svg{width: 20px; height: 20px; fill: #666;}
.graph-askBox .listWrap{width:100%; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; max-height: 500px; overflow: hidden; transition: max-height 0.3s ease; gap: 8px; margin-bottom: 10px;}
.graph-askBox .listWrap.collapsed{max-height: 0;}
.graph-askBox .listBox .list{height: 38px; padding: 4px 12px; box-sizing: border-box; flex: 0 1 auto; transition-duration: 0.2s; border-radius: 20px; background: rgba(255, 255, 255,0.3); font-size: 14px; color: #272727; letter-spacing: -0.05em; white-space: nowrap;}

.graph-askBox .listBox .list:hover{box-shadow: 2px 4px 6px rgba(0,0,0,0.2);}

/* 보라색 테마 버튼 
#vst .graph-askBox .listBox .list{
    border: 1.5px solid #A984D4;
    color: #222;
    font-weight: 700;
    background: #F3EFFF;
}*/

.graph-chatContainer .Chat-inner .textBox{margin-bottom: 10px; height: 50px;}
.graph-chatContainer .Chat-inner .textBox .textWrap{width: 100%; height: 100%;}
.graph-chatContainer .Chat-inner .textBox .textWrap .input_text{width: 100%; height: 100%; background: #fff; border: 1.2px solid #ccc; border-radius: 5px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; padding: 8px;}
.graph-chatContainer .Chat-inner .textBox .input_text .user_text{width: 100%; height: 100%; display: flex; flex-wrap: nowrap; align-items: center; position: relative}
.graph-chatContainer .Chat-inner .textBox .textWrap .input_text textarea{width: 95%; height: 30px; resize: none; box-sizing: border-box; text-align: left; overflow: hidden; border: none; outline: none; font-size: 14px;line-height: 2;}
.graph-chatContainer .Chat-inner .textBox .textWrap .input_text textarea::placeholder{color: #999; font-size: 14px; font-family: 'Pretendard' !important;}

.graph-chatContainer .Chat-inner .textBox .input_text .input_enter{width: 30px; height: 30px; border-radius: 50%; background: #000; text-align: center; cursor: pointer; transition: background-color 0.2s; display: flex; align-items: center; justify-content: center;flex-shrink: 0;}
.graph-chatContainer .Chat-inner .textBox .input_text .input_enter:hover{background: #333;}
.graph-chatContainer .Chat-inner .textBox .input_text .input_enter img{width: 12px;}

.graph-chatContainer .Chat-inner .guideBox{ display: flex; align-items: center; width: 100%; }
.graph-chatContainer .Chat-inner .guideBox .guide{display: flex; align-items: center; position: relative; width: 100%; justify-content: space-between;}
.graph-chatContainer .Chat-inner .guideBox .guide p{margin-right: 5px; color: var(--color-gray); font-size: 14px; font-weight: 500 !important;}
.graph-chatContainer .Chat-inner .guideBox .guide .btn_quesition{width: 28px; height: 28px;  border-radius: 50%; background: #666; text-align: center; cursor: pointer; transition: background 0.2s;}
.graph-chatContainer .Chat-inner .guideBox .guide .btn_quesition:hover{background: #555;}
.graph-chatContainer .Chat-inner .guideBox .guide .btn_quesition img{width: 8px; margin-bottom: 2px;}
.guide_detail{display: flex;align-items: center; position: relative;}

/* 가이드 툴팁 */
.graph-guide-tooltip {
    position: absolute;
    bottom: 45px;
    right: 0;
    background: white;
    border: 2px solid #007bff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 350px;
    max-width: 320px;
    animation: tooltipFadeIn 0.3s ease;
}

.graph-guide-tooltip::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 10px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
}

.graph-guide-tooltip p {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 13px;
    line-height: 1.5;
}

.graph-guide-tooltip p:last-child {
    margin-bottom: 0;
    color: #666;
    font-style: italic;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#graph-chatbot-toggle-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgb(255 255 255 / 60%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s;
    position: fixed;
    bottom: 30px; left: 30px;
    z-index: 1;
}

#graph-chatbot-toggle-button:hover {
    transform: scale(1.1);
}

#graph-chatbot-toggle-button.hidden {
    display: none;
}

#graph-chatbot-toggle-button svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* Chat Messages */
.graph-messagesContainer {
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.graph-messagesContainer.hidden {
    display: none;
}

.graph-message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 10px 10px 10px 0;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.4;
}

.graph-message.user {
    background-color: #A984D4;
    color: white;
    align-self: flex-end;
    margin-left: auto;
    border-radius: 10px 10px 0px 10px;
}

.graph-message.bot {
    background-color: #FFFFFF;
    align-self: flex-start;
    border: 1px solid #f0f0f0;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.graph-message.bot p{letter-spacing: -0.03em;}

.graph-message.bot.with-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.graph-message.bot.with-button p {
    margin-right: 10px;
}

.graph-btn-inline {
    background-color: #6A3E9A;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
}

.graph-message.loading {
    padding: 12px;
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
}

/* 📱 모바일 메시지 최적화 */
@media (max-width: 768px) {
    .graph-message {
        max-width: 80% !important;
        font-size: 14px !important;
        padding: 10px 14px !important;
    }
    
    .graph-welcome-icon {
        width: 100px !important;
        height: 100px !important;
        margin-bottom: 20px !important;
    }
    
    .graph-welcome-icon img {
        width: 60px !important;
        height: 60px !important;
    }
    
    .graph-welcome-text h1 {
        font-size: 20px !important;
    }
    
    .graph-welcome-text h2 {
        font-size: 14px !important;
    }
    
    .graph-welcome-suggestions {
        font-size: 13px !important;
    }
    
    .graph-chat-header {
        padding-bottom: 12px !important;
        margin-bottom: 12px !important;
    }
    
    .graph-header-title {
        font-size: 15px !important;
    }
}

.graph-typing-indicator {
    display: flex;
    align-items: center;
}

.graph-typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: #9E9E9E;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: bounce 1.2s infinite ease-in-out;
}

.graph-typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.graph-typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

/* 툴팁 스타일 */
.graph-tooltip {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 10px;
    padding: 8px 12px;
    background-color: #333;
    color: #fff;
    font-size: 14px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.graph-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 20px;
    border: 6px solid transparent;
    border-top-color: #333;
}

#graph-chatbot-toggle-button:hover .graph-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}



@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1.0);
    }
}

.graph-gobtn {
    display: flex;
    width: 100%;
    height: 30px;
    background-color: #000;
    color: #fff;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 20px;
}

.faqbtn_wr{white-space: normal;}
.faqbtn {
    display: flex;
    width: 100%;
    height: 40px;
    background-color: #F3EFFF;
    color: #000;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 10px;
    font-size: 14px;
}
.faqbtn:hover{background-color: #EAE4FF; color: #000;}

/* 🔵 역질문 버튼 스타일 (파란색 계열) */
/* 버튼들을 감싸는 컨테이너: 간격 조절의 핵심 */
/* .btn-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.clarification-btn {
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: 2px solid #1a73e8;
    color: #1a73e8;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clarification-btn:hover {
    background: #1a73e8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.clarification-btn:active {
    transform: translateY(-1px);
}

.clarification-btn .btn-title {
    font-weight: 600;
    font-size: 14px;
    color: #1a73e8;
}

.clarification-btn .btn-desc {
    font-size: 12px;
    color: #1a73e8;
    font-weight: 400;
}

.clarification-btn:hover .btn-title,
.clarification-btn:hover .btn-desc {
    color: white;
} */

/* 📱 모바일 FAQ 버튼 최적화 */
@media (max-width: 768px) {
    .graph-askBox .listBox .list {
        font-size: 13px !important;
        padding: 6px !important;
        height: 36px !important;
    }
    
    .graph-askBox .faq-header h3 {
        font-size: 13px !important;
    }
    
    .graph-askBox .faq-toggle-btn svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    .faqbtn {
        font-size: 13px !important;
        padding: 6px 12px !important;
    }
    
    .graph-chatContainer .Chat-inner .textBox {
        height: 48px !important;
        margin-bottom: 8px !important;
    }
    
    .graph-chatContainer .Chat-inner .textBox .textWrap .input_text textarea {
        font-size: 14px !important;
    }
    
    .graph-chatContainer .Chat-inner .textBox .textWrap .input_text textarea::placeholder {
        font-size: 13px !important;
    }
    
    .graph-chatContainer .Chat-inner .textBox .input_text .input_enter {
        width: 36px !important;
        height: 36px !important;
        flex-shrink: 0;
    }
    
    .graph-chatContainer .Chat-inner .guideBox .guide p {
        font-size: 12px !important;
    }
    
    .graph-chatContainer .Chat-inner .guideBox .guide .btn_quesition {
        width: 20px !important;
        height: 20px !important;
    }

    /* 모바일에서 툴팁 조정 */
    .graph-guide-tooltip {
        min-width: 240px !important;
        max-width: 280px !important;
        padding: 12px !important;
        font-size: 12px !important;
        right: -10px !important;
    }
    
    .graph-guide-tooltip p {
        font-size: 11px !important;
        margin-bottom: 6px !important;
    }
    
    .graph-messagesContainer {
        padding: 8px !important;
    }
    
    .graph-welcome-screen {
        padding: 30px 15px !important;
    }
}

/* 📱 매우 작은 화면 (360px 이하) 추가 최적화 */
@media (max-width: 360px) {
    .graph-message {
        max-width: 85% !important;
        font-size: 13px !important;
        padding: 8px 12px !important;
    }
    
    .graph-welcome-text h1 {
        font-size: 18px !important;
    }
    
    .graph-welcome-text h2 {
        font-size: 13px !important;
    }
    
    .graph-askBox .listBox .list {
        font-size: 12px !important;
        padding: 5px !important;
        height: 34px !important;
    }
    
    .graph-header-title {
        font-size: 14px !important;
    }
    
    .graph-chatContainer {
        padding: 8px !important;
    }
    
    #graph-chatbot-toggle-button {
        width: 52px !important;
        height: 52px !important;
        bottom: 16px !important;
        right: 16px !important;
    }
    
    #graph-chatbot-toggle-button img {
        width: 32px !important;
        height: 32px !important;
    }
}

/* 🔄 가로 모드 최적화 */
@media (max-width: 768px) and (orientation: landscape) {
    .graph-chatContainer .Chat-inner {
        height: 95vh !important;
        max-height: 95vh !important;
    }
    
    .graph-welcome-icon {
        width: 80px !important;
        height: 80px !important;
        margin-bottom: 15px !important;
    }
    
    .graph-welcome-icon img {
        width: 50px !important;
        height: 50px !important;
    }
    
    .graph-welcome-screen {
        padding: 20px 15px !important;
    }
    
    .graph-welcome-text h1 {
        font-size: 18px !important;
        margin-bottom: 15px !important;
    }
}

/* 👆 터치 스크린 최적화 */
@media (max-width: 768px) {
    /* 터치 영역 확대 */
    .graph-askBox .listBox .list,
    .faqbtn,
    .clarification-btn,
    .graph-btn_close,
    .graph-faq-toggle-btn,
    .input_enter,
    .btn_quesition {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
    }
    
    /* 스크롤 부드럽게 */
    .graph-messagesContainer {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    
    /* 입력창 자동 확대 방지 (iOS) */
    .graph-chatContainer .Chat-inner .textBox .textWrap .input_text textarea {
        font-size: 16px !important; /* iOS 자동 줌 방지 */
    }
    
    /* 줌 제한 */
    html, body {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    /* 버튼 클릭 영역 확대 */
    .graph-btn_close,
    .graph-faq-toggle-btn {
        padding: 8px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    /* 안전 영역 고려 (노치 있는 기기) */
    .graph-chatContainer {
        padding-top: max(50px, env(safe-area-inset-top)) !important;
        padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
        padding-left: max(10px, env(safe-area-inset-left)) !important;
        padding-right: max(10px, env(safe-area-inset-right)) !important;
    }
    
    /* 키보드 올라올 때 대응 */
    .graph-chatContainer.keyboard-open {
        height: 100vh !important;
        max-height: 100vh !important;
    }
}

/* ========================================
   BEXCO 챗봇 답변 가독성 향상 CSS v3
   (여백 최소화 버전)
   ======================================== */

/* 기본 메시지 박스 스타일 */
.graph-message.bot {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    color: #333;
}

/* 제목 스타일 */
.graph-message.bot h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1a73e8;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #e8f0fe;
}

.graph-message.bot h4 {
    font-size: 14px;
    font-weight: 600;
    color: #5f6368;
    margin: 12px 0 3px 0;
}

/* v3: 섹션 구분 제거 (여백 최소화) */
/* .info-section, .capacity-section, .link-section, .contact-section 등의 패딩/마진 제거 */

/* 리스트 스타일 (여백 최소화) */
.graph-message.bot ul {
    list-style: none;
    padding: 0;
    margin: 2px 0;
}

.graph-message.bot ul li {
    padding: 0;
    position: relative;
    line-height: 1.5;
}

/* 중첩 리스트 (2단계) */
.graph-message.bot ul ul {
    margin: 1px 0 1px 8px;
    padding-left: 0;
}

.graph-message.bot ul ul li {
    padding: 1px 0 1px 14px;
    font-size: 13px;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

.graph-message.bot ul ul li::before {
    content: "·";
    left: 2px;
    color: #5f6368;
    font-size: 16px;
    margin-right: 5px;
}

/* 순서 리스트 (여백 최소화) */
.graph-message.bot ol {
    padding-left: 20px;
    margin: 2px 0;
}

.graph-message.bot ol li {
    padding: 2px 0;
    line-height: 1.5;
}

/* 버튼 스타일 */
.graph-message.bot .faqbtn_wr {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 12px;
}

.graph-message.bot .faqbtn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: white;
    border: 2px solid #1a73e8;
    color: #1a73e8;
    text-decoration: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 0;
    box-sizing: border-box;
}

.graph-message.bot .faqbtn:hover {
    background: #1a73e8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.graph-message.bot .faqbtn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.graph-message.bot .faqbtn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* v3: 문의 정보 작게 표시 */
.graph-message.bot small {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.graph-message.bot p small {
    display: block;
    margin: 8px 0 0 0;
}

/* Strong 태그 강조 */
.graph-message.bot strong {
    color: #1a73e8;
    font-weight: 600;
}

/* 링크 스타일 */
.graph-message.bot a:not(.faqbtn) {
    color: #1a73e8;
    text-decoration: none;
    border-bottom: 1px solid #1a73e8;
    transition: all 0.2s;
}

.graph-message.bot a:not(.faqbtn):hover {
    color: #0d47a1;
    border-bottom-color: #0d47a1;
}

/* 추가 안내 텍스트 */
.graph-message.bot em {
    color: #666;
    font-size: 13px;
    font-style: italic;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .graph-message.bot h3 {
        font-size: 16px;
    }
    
    .graph-message.bot h4 {
        font-size: 13px;
    }
    
    .graph-message.bot .faqbtn_wr {
        flex-direction: column;
    }
    
    .graph-message.bot .faqbtn {
        width: 100%;
        justify-content: center;
    }
}

/* 스크롤바 스타일 (Webkit 브라우저) */
.graph-message.bot::-webkit-scrollbar {
    width: 8px;
}

.graph-message.bot::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.graph-message.bot::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.graph-message.bot::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.graph-message.bot {
    animation: fadeIn 0.3s ease-out;
}

/* 아이콘 여백 조정 */
.graph-message.bot h3::before,
.graph-message.bot h4::before {
    margin-right: 8px;
}

/* 코드 블록 숨김 (```html 등) */
.graph-message.bot > text {
    display: none;
}

/* v3: 추가 여백 최소화 */
.graph-message.bot > *:first-child {
    margin-top: 0;
}

.graph-message.bot > *:last-child {
    margin-bottom: 0;
}

/* v3: 단락 여백 최소화 */
.graph-message.bot p {
    margin: 4px 0;
}

/* 이미지 스타일 */
.graph-message.bot img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
}

.graph-message.bot table{margin: 15px;}
.graph-message.bot table th{text-align: left; padding: 5px 10px;}
.graph-message.bot table td{padding: 3px 10px; word-break: keep-all;}
.graph-message.bot table td:first-child{white-space: nowrap;}


/* Screen reader only - hidden visually but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.graph-chat-header { position: relative; }
.chat_beta-badge {
    background: #ff3b30;
    color: #fff;
    padding: 4px 10px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 10;
    cursor: unset;
    margin-left: 10px;
}
.chat_disclaimer {
    margin-top: 8px;
    color: #444;
    font-size: 12px;
    background: transparent;
    padding: 4px 6px;
    border-radius: 4px;
}
@media (max-width:420px){
    .chat_beta-badge{ left: 60px; font-size:11px; }
    .chat_disclaimer{ font-size:11px }
}

