@charset "UTF-8";

/* 260917 AI 챗봇(→ 510.ai 챗봇.html, 511.챗봇 내용.html) 정부24 AI 레이아웃 참고, 메인비즈 스타일로 재구성 */
/* 로그인 전 상태를 보려면 .ai_chat_wrap 에 class="guest" 추가 */
/* 260918 독립된 챗봇 창 성격이라 사이트 공통 헤더/푸터 제외 → 헤더 높이만큼 잡혀있던 sub_container 상단 여백 제거 */
/* 이 프로젝트 layout.css 의 sub_container 여백/flex, content_wrap 너비(lnb 제외 calc), sub.css .content_wrap p 여백을 챗봇 창에서 해제 */
.no_chrome .sub_container{margin: 0;padding: 0;background: #fefefe;}
.no_chrome .content_wrap{width: 100%;padding-top: 0;}
.ai_chat_wrap p{margin: 0;}
/* 260919 content_inner 의 기존 여백/최대너비를 이 페이지에서만 해제(정부24 AI처럼 좌우 꽉 채운 배치) */
.no_chrome .content_inner{padding: 0;max-width: none;margin: 0;}
.login_only{display: block;}
.guest_only{display: none;}
.ai_chat_wrap.guest .login_only{display: none;}
.ai_chat_wrap.guest .guest_only{display: block;}

/* 260918 모바일~1024px 미만: 메뉴 버튼으로 ai_chat_side 를 슬라이드 메뉴로 열고 닫음 */
/* 260919~260920 로고(header>h1)는 ai_chat_side 와 분리해 ai_chat_col 상단에 둠: 모바일은 상단바, 1024px 이상은 사이드 칼럼 맨 위로 자연스럽게 이어짐 */
.ai_chat_col{width: 100%;}
.ai_chat_topbar{display: flex;align-items: center;gap: 12px;margin-bottom: 16px;}
.ai_chat_menu_open{flex-shrink: 0;display: inline-flex;align-items: center;gap: 6px;background: var(--white);font-size: 0;font-weight: 700;color: var(--tit_black);}
.ai_chat_menu_open:before{content: "";width: 24px;height: 24px;background: url("/images/content/menu.svg") no-repeat center / contain;}
.no_chrome header.ai_chat_logo {position: inherit;width: auto;background:inherit;z-index: inherit;transition: none;margin: 0 auto;}
.ai_chat_logo h1 a{display: flex;gap: 6px;font-size: 18px;font-weight: 800;align-items: flex-end;}
.ai_chat_logo h1 span{width: 200px;height:30px;font-size: 0;overflow: hidden;background: url("/images/common/logo.png") center /cover;}
.ai_chat_logo h1 em{font-style: normal;color: var(--blue);margin-left: 2px;}
.ai_chat_side_dim{display: none;position: fixed;inset: 0;background: rgba(0, 0, 0, .6);z-index: 30;}
.ai_chat_side_dim.on{display: block;}
.ai_chat_menu_close{position: absolute;top: 16px;right: 16px;width: 24px;height: 24px;font-size: 0;background: var(--cm_ico) center -128px;}

.ai_chat_wrap{display: flex;flex-direction: column;gap: 20px;padding: 20px;}
.ai_chat_side{position: fixed;top: 0;left: 0;bottom: 0;width: 84%;max-width: 320px;padding: 55px 20px;border: 1px solid #E3E7ED;background: var(--white);overflow-y: auto;transform: translateX(-100%);transition: transform .3s ease;}
.ai_chat_side_dim.on .ai_chat_side{transform: translateX(0);}
.ai_chat_new{display: flex;align-items: center;justify-content: center;gap: 6px;width: 100%;padding: 12px;margin-bottom: 24px;border: 1px solid var(--blue);border-radius: 12px;background: var(--white);color: var(--blue);font-size: 15px; font-weight: 500;transition: .2s;font-family: var(--tit);}
.ai_chat_new:before{content: "+";font-size: 16px;font-weight: 700;}
.ai_chat_new:hover, .ai_chat_new:focus{background: var(--blue);color: var(--white);}
.ai_chat_sec{padding-bottom: 20px;margin-bottom: 20px;border-bottom: 1px dashed var(--light_blue);}
.ai_chat_sec:last-child{padding-bottom: 0;margin-bottom: 0;border-bottom: 0;}
.ai_chat_sec .tit{font-size: 22px;font-weight: 500;color: var(--tit_black);margin: 10px 0;}
.ai_chat_sec .empty{font-size: 14px;color: #999;}
.ai_chat_sec ul{display: flex;flex-direction: column;gap: 8px;}
.ai_chat_sec ul li a{display: block;padding: 8px 10px;border-radius: 8px;background: var(--bg_blue);font-size: 14px;color: var(--text_black);white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
.ai_chat_sec ul li a:hover, .ai_chat_sec ul li a:focus{color: var(--blue);text-decoration: underline;}
.ai_chat_guest{padding: 24px 16px;border-radius: 12px;background: var(--bg_blue);text-align: center;}
.ai_chat_guest p{margin-bottom: 16px;font-size: 14px;line-height: 1.6;color: var(--text_black);}
.ai_chat_guest .btn_login{display: flex;align-items: center;justify-content: center;width: 100%;padding: 12px;border-radius: 12px;background: var(--blue);color: var(--white);font-size: 15px;font-weight: 700;}
.ai_chat_guest .btn_login:hover, .ai_chat_guest .btn_login:focus{background: var(--tit_black);}

.ai_chat_main{width: 100%;}
.chat_inner {max-width: 1200px;margin: 0 auto;}
.ai_chat_greet{padding: 30px 10px;text-align: center;}
.ai_chat_greet .loc{display: flex;align-items: center;justify-content: center;gap: 6px;margin-bottom: 16px;font-size: 14px;color: var(--text_black);}
.ai_chat_greet .loc:before{content: "";width: 6px;height: 6px;border-radius: 100%;background: var(--blue);}
.ai_chat_greet .hi{font-family: var(--tit);font-size: 22px;font-weight: 400;}
.ai_chat_greet .hi em{font-weight: 500;color: var(--blue);}
.ai_chat_greet .info{display: flex;align-items: center;justify-content: center;gap: 6px;margin-top: 16px;font-size: 14px;color: var(--text_black);}
.ai_chat_greet .info:before{content: "i";display: inline-flex;align-items: center;justify-content: center;width: 16px;height: 16px;border-radius: 100%;border: 1px solid #999;font-size: 11px;font-style: italic;color: #999;}
/* 260921 챗봇 입력창은 화면 크기와 상관없이 항상 하단에 떠있어야 해서(일반적인 챗봇 UX) sticky를 모바일 포함 기본 규칙으로 적용 */
/* 260921 화면 맨 아래 딱 붙지 않도록 여백을 두고, iOS 홈 인디케이터 등 하단 안전영역도 겹치지 않게 더해줌 */
.ai_chat_input_wrap{position: sticky;bottom: calc(16px + env(safe-area-inset-bottom, 0px));z-index: 2;}
.ai_chat_input{display: flex;align-items: flex-end;overflow: hidden;border-radius: 28px;border: 2px solid var(--blue);background: var(--white);padding-left: 20px;}
.ai_chat_input textarea{flex: 1;min-width: 0;border: none;resize: none;padding: 14px 0;font-family: inherit;font-size: 15px;line-height: 1.5;max-height: 160px;overflow-y: auto;background: transparent;min-height: 55px;}
.ai_chat_input textarea::placeholder{color: #999;}
.ai_chat_input button{flex-shrink: 0;width: 48px;height: 48px;margin: 4px;background: url("/images/content/submit.svg") no-repeat center / 12px 14px var(--blue);border-radius: 100%;font-size: 0;overflow: hidden;transition: .2s;}
.ai_chat_input button:hover, .ai_chat_input button:focus{background-color: var(--tit_black);}
.ai_chat_cards{display: grid;grid-template-columns: 1fr;gap: 16px;margin-top: 30px;}
.ai_chat_cards .card{display: block;padding: 20px;border: 1px solid #E3E7ED;border-radius: 14px;background: #f5f5f5;;transition: .2s;}
.ai_chat_cards .card:hover, .ai_chat_cards .card:focus{border-color: var(--blue);box-shadow: 0 4px 10px rgba(0, 0, 0, .06);}
.ai_chat_cards .card strong{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;overflow: hidden;margin-bottom: 10px;font-size: 16px;font-weight: 700;line-height: 1.4;color: var(--tit_black);}
.ai_chat_cards .card p{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;font-size: 14px;line-height: 1.6;color: var(--text_black);}

/* 260918 AI 챗봇 대화내용(→ 511.챗봇 내용.html) 사용자 질문/AI 답변 스레드, AI 답변은 sub.css 의 .ai_result 컴포넌트를 그대로 재사용 */
/* 260921 입력창과 겹치는 마지막 부분이 뚝 끊기지 않고 옅게 사라지도록 처리. 입력창 위에 별도 오버레이를 얹는 방식은 다른 답변 카드(.ai_result 는 position:relative)와 쌓임 순서가 꼬여 텍스트를 못 가려서, 텍스트를 포함한 스레드 자체를 마스크로 페이드(좌우 폭 그대로 유지되어 양옆도 자연스럽게 이어짐) */
.ai_chat_thread{display: flex;flex-direction: column;gap: 32px;padding: 10px 0 40px;max-width: 1200px;margin: 0 auto;-webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 50px), transparent 100%);mask-image: linear-gradient(to bottom, #000 calc(100% - 50px), transparent 100%);}
.ai_chat_msg.user{display: flex;justify-content: flex-end;}
.ai_chat_msg.user .txt{max-width: min(82%, 640px);padding: 14px 20px;border-radius: 20px 20px 4px 20px;background: var(--blue);color: var(--white);font-size: 16px;line-height: 1.6;word-break: break-word;}
.ai_chat_msg.ai{width: 100%;}
.ai_chat_name {display: flex;align-items: flex-start;gap: 5px;margin-bottom: 10px;font-size: 20px;font-weight: 500;color: var(--tit_black);flex-direction: column;}
.ai_chat_name span{flex-shrink: 0;width: 66px;height: 40px;background: url("/images/content/caboni_img.png") no-repeat center bottom / contain;}
/* 챗봇 AI 답변은 박스 없이 텍스트만 노출(통합검색 .ai_result 박스 스타일 해제) */
.ai_chat_msg.ai .ai_result{width: 100%;margin: 0;padding: 0;border: 0;border-radius: 0;background: none;box-shadow: none;}
.ai_chat_msg.ai .ai_cont{padding: 0;}
/* AI 답변 본문: 통합검색(.ai_cont_wrap > p)과 같은 글자 스타일, sub.css .content_wrap h4 여백 해제 */
.ai_chat_msg.ai .ai_cont > p{font-size: 16px;line-height: 1.7;color: var(--text_black);word-break: keep-all;}
.ai_chat_msg.ai .ai_cont img{display: block;max-width: min(100%, 420px);height: auto;margin: 8px 0;border-radius: 8px;border: var(--line);}
.ai_chat_msg.ai .ai_sub h4{margin: 0;}
.ai_chat_thread + .ai_chat_input_wrap{margin-top: 4px;}


@media (min-width: 425px){}
@media (min-width: 360px){}
@media (min-width: 375px){}

@media (max-width: 768px){}
@media (max-width: 1218px){}
/* pc */
@media (min-width: 1024px){
/* 260917~260920 AI 챗봇: 1024px 이상부터 슬라이드 메뉴 대신 좌우 고정 배치로 전환, 로고는 ai_chat_col 안에서 사이드 영역 맨 위로 자연스럽게 위치 */
.no_chrome .sub_container{padding-top: 0;height: 100vh;overflow: hidden;}
.no_chrome .content_wrap{height: 100%;}
.no_chrome .content_inner{height: 100%;}
.no_chrome header.ai_chat_logo {margin: inherit;}
.ai_chat_menu_open{display: none;}
.ai_chat_side_dim{display: block;position: static;background: none;z-index: auto;}
.ai_chat_side{position: static;width: 100%;max-width: none;background: transparent;overflow-y: visible;transform: none;transition: none;padding: 0;border: 0;}
.ai_chat_menu_close{display: none;}

/* 260918 오른쪽(ai_chat_main)만 내부 스크롤, 왼쪽(ai_chat_col)은 화면에 고정(→ 정부24 AI 검색 참고) */
.ai_chat_wrap{display: grid;grid-template-columns: 260px minmax(0, 1fr);align-items: stretch;gap: 60px;padding: 0;height: 100%;}
.ai_chat_col{width: auto;height: 100%;border-radius: 0;background: var(--bg_blue);padding: 30px 15px;overflow-y: auto;}
.ai_chat_main{width: auto;min-width: 0;height: 100%;overflow-y: auto;padding: 30px 25px;}
.ai_chat_greet{padding: 50px 0 40px;}
.ai_chat_greet .hi{font-size: 32px;}
.ai_chat_cards{grid-template-columns: repeat(3, 1fr);}
.ai_chat_new {font-size: 18px;}
.ai_chat_sec ul li a {font-size: 16px;}
.ai_chat_cards .card strong {font-size: 18px;}
.ai_chat_msg.ai .ai_cont > p{font-size: 18px;}
/* 260918 정부24 AI 검색처럼 입력창을 sticky로 하단 고정(전체 스크롤은 ai_chat_main 하나가 담당, 너비값은 그대로 둠) */
.ai_chat_input_wrap{bottom: calc(30px + env(safe-area-inset-bottom, 0px));max-width: 1200px;margin: 0 auto;}
}
@media (min-width: 1152px){}
/* wide */
@media (min-width: 1440px){
.no_chrome .sub_container{padding-top: 0;}
}
@media (min-width: 1540px){}
@media (min-width: 1580px){}
@media (min-width: 1920px){}
