

#chatbot-toggle {
    cursor: pointer;
}

/* 챗봇 컨테이너 */
#chatbot-container {
    position: fixed;
    bottom: 160px;
    right: 285px;
    width: 520px; 
    height: 710px; 
    border: 1px solid #ccc;
    border-radius: 12px; 
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); 
    display: none; 
    flex-direction: column;
    background-color: #fff;
    z-index: 9999999999;
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', 'Nanum Gothic', sans-serif; 
    overflow: hidden; 
}

/* 챗봇 헤더 */
#chatbot-header {
    display: flex;
    padding: 20px 28px;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    align-self: stretch;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(91deg, #0AF 15.17%, #1746FF 115.13%);
    flex-direction: row;
    align-items: flex-end;
    z-index: 999;
}
#chatbot-header .header-left {
    color: var(--color-gray0, #FFF);
    font-family: var(--font-type, Pretendard);
    font-size: var(--fontSize-20, 18px);
    font-style: normal;
    font-weight: 700;
    line-height: 150%; 
}
.hd_yl{
    color: #FFEF43 !important;
    font-family: var(--font-type, Pretendard) !important;
    font-size: var(--fontSize-20, 20px) !important;
    font-style: normal !important;
    font-weight: 700 !important;
    line-height: 150% !important;
}
#chatbot-header .header-left img {
    height: 28px; /* 로고 크기 조정 */
    margin-right: 8px;
}
#chatbot-header .header-left span {
    font-weight: bold;
    color: #0a4a8c;
    font-size: 15px;
}
#chatbot-header .close-button {
    display: flex;
    padding: 4px 12px;
    justify-content: center;
    align-items: center;
    border-radius: 600px;
    background: var(--color-gray0, #FFF);
    color: var(--color-navy70, #3D6391);
    font-family: var(--font-type, Pretendard);
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 150%; 
    border: none;
    cursor: pointer;
}


/* 채팅 메시지 영역 */
#chat-window {
    padding: 46px 31px !important;
    display: flex;
    overflow-y: auto;
    padding: 46px 31px;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    align-self: stretch;
    background: var(--color-maingray, #F6F6F6);
    height: 500px;
}
/* 스크롤바 디자인 */
#chat-window::-webkit-scrollbar {
    width: 8px;
}
#chat-window::-webkit-scrollbar-track {
    background: #f1f1f1;
}
#chat-window::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}
#chat-window::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}


/* 챗봇 인트로 화면 스타일 */
#chatbot-intro {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%; 
    z-index: 10; 
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    justify-content: flex-start; 
    align-items: center; 
    text-align: center;
    padding: 130px 20px 20px 20px;
    background-color: #f9f9f9;
    box-sizing: border-box;
}

.intro-prompt-message {

    display: flex;
    flex-wrap: wrap;
    gap: 8px; 

    justify-content: flex-start;
    max-width: 302px;
    height: auto;
    padding: 15px;
    background: #e8f0fb;
    border-radius: 0 20px 20px 20px;
    word-wrap: break-word;
    text-align: left ! important;
    
    margin-left: 3px;
    margin-right: auto; 
    
    font-size: 15px;
    font-weight: bold;
    margin-top: 20px; 
    line-height: 1.4;
}


.intro-avatar {
    width: 65px; 
    /* height: 65px; */
    border-radius: 50%;
    /* margin-bottom: 10px; */
    background-color: #f0f0f0; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

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

.intro-title {
    font-size: 18px;
    color: #4A4A4A; 
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
}

.intro-title strong {
    color: #e65a00;
    font-weight: 900; 
}

.intro-note {
    font-size: 13px;
    color: #777;
    line-height: 1.5;
    font-weight: 500;
}
.user-message-wrap > .avatar-placeholder{
    display: none;;
}
#intro-quick-replies-container {
    display: flex;
    justify-content: flex-end; 
    flex-wrap: wrap;
    margin-top: 15px; 
    width: 100%;
    gap: 8px; 
}

#intro-style-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-radius: 10px;
    justify-content: flex-end;
    opacity: 1; 
    transition: none; 
}

#intro-style-quick-replies .quick-reply-button {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.35s ease-out, transform 0.35s ease-out; 
    display: flex;
    padding: 4px 12px;
    justify-content: center;
    align-items: center;
    border-radius: 600px;
    border: 1px solid var(--color-mainblue, #0AF);
    background: var(--color-gray0, #FFF);
    color: var(--color-mainblue, #0AF);
    font-family: var(--font-type, Pretendard);
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 150%; /* 21px */
}

#intro-style-quick-replies.show .quick-reply-button-animated {
    opacity: 1;
    transform: translateY(0);
}


/* 메시지 랩퍼 */
.message-wrap {
    width: 100%;
    margin-bottom: 18px; 
    display: flex;
    align-items: flex-start;
    box-sizing: border-box;
    font-size: 15px;
}

/* 아바타 */
.avatar-placeholder {
    width: 40px; 
    height: auto;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #eee; 
}

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

/* 봇 메시지 */
.bot-message-wrap {
    justify-content: flex-start;
}

.bot-message-wrap .avatar-placeholder {
    margin-right: 3px;
}

.bot-message {
    position: relative;
    max-width: 302px;
    height: auto;
    padding: 15px;
    background: #e8f0fb;
    border-radius: 0 20px 20px 20px;
    word-wrap: break-word;
    text-align: left;
    margin-left: 3px;
    display: flex;
    padding: 12px 16px;
    justify-content: center;
    /* align-items: center; */
    gap: 10px;
    align-self: stretch;
    border-radius: 0 8px 8px 8px;
    border: 1px dashed var(--color-mainblue, #0AF);
    background: var(--color-gray0, #FFF);
    color: var(--color-gray70, #333);
    font-family: var(--font-type, Pretendard);
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 150%;
    flex-direction: column;
}

/* 봇 메시지 시간 */
.bot-timestamp {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
    margin-left: 8px;
}

/* 사용자 메시지 */
.user-message-wrap {
    justify-content: flex-end;
}

.user-message-wrap .avatar-placeholder {
    margin-left: 3px;
}

.user-message {
    position: relative;
    max-width: 302px;
    height: auto;
    padding: 15px;
    background: #0a4a8c;
    color: #fff;
    border-radius: 20px 0 20px 20px;
    word-wrap: break-word;
    text-align: left;
    margin-right: 3px;
    display: flex;
    padding: 12px 16px;
    justify-content: center;
    /* align-items: center; */
    gap: 10px;
    align-self: stretch;
    border-radius: 8px 0 8px 8px;
    border: 1px solid var(--color-mainblue, #0AF);
    background: var(--color-mainblue, #0AF);
    color: var(--color-gray0, #FFF);
    font-family: var(--font-type, Pretendard);
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 150%;
}

/* 사용자 메시지 시간 */
.user-timestamp {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
    margin-right: 8px; /* 메시지와 시간 간격 */
    text-align: right;
}

/* 입력 영역 */
#chat-input-area {
    display: flex;
    align-items: flex-end; /* 메뉴 버튼, 입력창, 전송 버튼을 하단 정렬 */
    padding: 10px;
    border-top: 1px solid #eee;
    background-color: #fff;
    position: relative; 
    z-index: 999;
    background: var(--color-blue10, #E5F7FF);
}

/* 삼지창 메뉴 버튼 */
#quick-reply-toggle {
    border: none;
    cursor: pointer;
    line-height: 1; 
    transition: opacity 0.2s; 
    margin: 0 15px 0px 15px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44' fill='none'%3E%3Cpath d='M5.5 22H38.5' stroke='%2300AAFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5.5 11H38.5' stroke='%2300AAFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5.5 33H38.5' stroke='%2300AAFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain; 
    background-color: #E5F7FF;
}


#input-wrapper {
    flex-grow: 1;
    position: relative; 
    background: #f5f5f5; 
    border-radius: 20px; 
    border: 1px solid #ddd;
    display: flex;
    align-items: flex-end; 
    margin-right: 5px; 
    max-height: 120px; 
    overflow: hidden; 
}

#chat-input {
    background: transparent;
    flex-grow: 1;
    padding: 15px;
    border: none;
    outline: none;
    resize: none;
    min-height: 48px;
    height: 48px;
    overflow-y: hidden;
    line-height: 1.5;
    box-sizing: border-box;
    font-size: 14px;
    padding-right: 55px;
    ime-mode: active;
    display: flex;
    width: 355px;
    padding: 12px 16px;
    align-items: center;
    gap: 10px;
    align-self: stretch;
    color: var(--color-gray50, #777);
    font-family: var(--font-type, Pretendard);
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
    background: #FFF;
}

#chat-input::placeholder {
    font-size: 14px;
    color: #aaa; 
    opacity: 1; 
    font-weight: bold;
}

#chat-input::-webkit-input-placeholder { font-size: 14px; color: #aaa; font-weight: bold;}
#chat-input:-moz-placeholder { font-size: 14px; color: #aaa; opacity: 1; font-weight: bold;}
#chat-input::-moz-placeholder { font-size: 14px; color: #aaa; opacity: 1; font-weight: bold;}
#chat-input:-ms-input-placeholder { font-size: 14px; color: #aaa; font-weight: bold;}


#chat-send {
    position: absolute;
    right: 18px;
    bottom: 5px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #00AAFF; 
    
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s;
    
    background-image: url(../images/global/ic_arrowSend.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
}


/* 로딩 인디케이터 */
.typing-indicator {
    display: inline-flex;
    align-items: center;
    height: 10px;
    padding: 0 5px;
}
.typing-indicator span {
    width: 6px;
    height: 6px;
    margin: 0 2px;
    background-color: #0a4a8c; /* 위너넷 메인 색상 */
    border-radius: 50%;
    opacity: 0.5;
    animation: typing-dots 1.2s infinite ease-in-out;
}
.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-dots {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.bot-message-loading {
    padding: 15px;
    height: 25px; 
    display: flex;
    align-items: center;
}

/* 빠른 답변 팝업을 위한 전체 화면 오버레이 (마스킹 효과) */
#quick-reply-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); 
    z-index: 9; 
    display: none; /* 초기에는 숨김 */
}

/* 빠른 답변 찾기 팝업 */
#quick-reply-popup {
    position: absolute;
    bottom: 0; 
    left: 0;
    width: 100%;
    height: 420px; 
    max-height: none; 
    background-color: #fff;
    border-radius: 12px 12px 0 0; 
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden; 
    padding: 0; 
    box-sizing: border-box;
    
    transform: translateY(100%); /* 기본적으로 완전히 아래로 숨김 */
    transition: transform 0.3s ease-out;
    z-index: 10; /* 오버레이보다 높게 설정 */
}

#quick-reply-popup.active {
    transform: translateY(0); /* 아래에서 위로 완전히 올라오도록 (bottom: 0 기준) */
}

#quick-reply-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 0;
    flex-shrink: 0;
}

#quick-reply-popup-header h3 {
    margin: 0;
    font-size: 16px;
    color: #0a4a8c;
}
#quick-reply-popup-header .close-popup-button {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
#quick-reply-popup-header .close-popup-button:hover {
    color: #555;
}

#quick-reply-buttons {
    display: flex;
    flex-wrap: wrap; /* 버튼이 넘치면 다음 줄로 */
    gap: 10px; 
    padding: 15px; 
    overflow-y: auto; 
}

.quick-reply-button {
    background-color: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 5px 18px; 
    font-size: 14px;
    color: #555;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    white-space: nowrap; 
    margin: 2px; 
}

.quick-reply-button:hover {
    box-shadow: 0 4px 12px rgba(10, 74, 140, 0.3); /* 부드러운 그림자 효과 */
    transform: scale(1.05); /* 약간 커지는 효과 */
}

/* 챗봇 링크 버튼 */
.chat-link-button {
    display: inline-block;
    padding: 8px 16px;
    margin-top: 8px; 
    margin-right: 5px; 
    border: none;
    border-radius: 8px;
    background-color: #d32f2f; 
    color: #ffffff !important; 
    text-decoration: none !important;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
    word-break: break-all;
    max-width: 100%;
}
.chat-link-button:hover {
    background-color: #b71c1c; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#chatbot-footer-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 15px;
    border-top: 1px solid #eee;
    background-color: #fff;
}

#chatbot-footer-quick-replies .quick-reply-button {
    background-color: #f0f0f0;
    border: 1px solid #dcdcdc;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: 0.2s;
}

#chatbot-footer-quick-replies .quick-reply-button:hover {
    background-color: #e0e0e0;
}

/* 버튼 그룹 래퍼 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 상담사 연결 버튼 */
.connect-agent-button {
    display: flex;
    padding: 4px 12px;
    justify-content: center;
    align-items: center;
    border-radius: 600px;
    border: 1px solid var(--color-gray0, #FFF);
    cursor: pointer;
    color: var(--color-gray0, #FFF);
    font-family: var(--font-type, Pretendard);
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 150%; /* 21px */
    background-color: transparent;
}
  

