/* ============================================
   챗봇 UI - PC 버전 (이지온)
   ============================================ */

.chatbot-toggle {
    position: fixed;
    bottom: 80px;
    right: 50%;
    margin-right: -640px;
    width: 232px;
    height: 50px;
    border-radius: 25px;
    background-color: #5066EC;
    color: #fff;
    border: none;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    padding-left: 70px;
    border: 1px solid #fff;
}

.chatbot-toggle::before {
  content: '';
  width: 68px;
  height: 62px;
  background: url('../../images/www/chatbot/bot_btn.png') no-repeat center;
  position: absolute;
  left: 37px;
  bottom: 0;
}

.chatbot-window {
    position: fixed;
    bottom: 155px;
    right: 50%;
    margin-right: -640px;
    width: 440px;
    height: 640px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    flex-direction: column;
    overflow: hidden;
    display: none;
}

.chatbot-window.is-open {
    display: flex;
}

.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 20px;
    background: url('../../images/www/chatbot/bot_top.png') no-repeat right 35px bottom #5066EC;
    color: #fff;
    flex-shrink: 0;
}

.chatbot-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    padding-left: 32px;
}

.chatbot-header-title svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.chatbot-header-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-header-close svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.chatbot-header-close:hover svg {
    opacity: 0.8;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 22px 16px 20px;
    background: #F7F8FC;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.chatbot-messages .q-list {
  padding-left: 45px;
}

.chatbot-messages .q-list ul li button {
  font-size: 14px;
  font-weight: 400;
  color: #5066EC;
  padding: 10px 20px;
  background: #fff;
  border-radius: 20px;
  border: 1px solid #D9E1FF;
}

.chatbot-messages .q-list ul li ~ li {
  margin-top: 8px;
}

.chatbot-messages .link-list {
  padding-left: 45px;
}

.chatbot-messages .link-list ul {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.chatbot-messages .link-list ul li a,
.chatbot-messages .link-list ul li button {
  font-size: 14px;
  font-weight: 400;
  color: #141414;
  padding: 8px 17px 8px 32px;
  background: url('../../images/www/chatbot/icon_link.png') no-repeat left 12px center #fff;
  border-radius: 20px;
  border: 1px solid #DFE1E9;
  display: inline-block;
}

.chatbot-msg {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 100%;
    margin-top: 20px;
}

.chatbot-msg:first-child {
  margin-top: 0;
}

.chatbot-msg .chatbot-msg-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.chatbot-msg.bot .chatbot-msg-box {
  align-items: flex-start;
}

.chatbot-msg-box .chatbot-msg-bubble ~ .chatbot-msg-bubble {
  margin-top: 7px;
}

.chatbot-msg-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.chatbot-msg.bot {
    align-self: flex-start;
}

.chatbot-msg.bot .chatbot-msg-bubble {
    background: #fff;
    color: #333;
    border: 1px solid #E9EAF0;
    border-top-left-radius: 0;
}

.chatbot-msg-avatar {
    width: 37px;
    height: 37px;
    border-radius: 50%;
    background: #5066EC;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chatbot-msg-avatar svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.chatbot-msg.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chatbot-msg.user .chatbot-msg-bubble {
    background: #5066EC;
    color: #fff;
    border-top-right-radius: 0;
}

.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
}

.chatbot-typing span {
    width: 6px;
    height: 6px;
    background: #3F55D9;
    border-radius: 50%;
    animation: chatbot-typing-bounce 1.4s infinite ease-in-out;
}

.chatbot-typing span:nth-child(1) {
    animation-delay: 0s;
}

.chatbot-typing span:nth-child(2) {
    animation-delay: 0.3s;
}

.chatbot-typing span:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes chatbot-typing-bounce {
    0%, 60%, 100% {
        opacity: 1;
    }
    30% {
        opacity: 0.3;
    }
}

.chatbot-ft {
  border-top: 1px solid #e8eaf0;
  background: #fff;
  padding: 0 16px 15px;
  position: relative;
}

.chatbot-ft .new-btn {
  font-size: 14px;
  color: #fff;
  background: rgba(0,0,0,.8);
  padding: 8px 15px;
  border-radius: 50px;
  position: absolute;
  top: -50px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.chatbot-ft .ft-menu {
  width: 100%;
  display: none;
}

.chatbot-ft .ft-menu.open {
  display: flex;
}

.chatbot-ft .ft-menu ul {
  width: 100%;
}

.chatbot-ft .ft-menu ul li a {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 0;
  font-size: 14px;
  gap: 6px;
}

.chatbot-ft .ft-menu ul li ~ li {
  border-top: 1px solid #ddd;
}

.chatbot-input {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
    margin-top: 15px;
}

.chatbot-input .send-menu {
  width: 42px;
  height: 42px;
  background: url('../../images/www/chatbot/icon_talk.png') no-repeat center;
}

.chatbot-input .send-menu.open {
  background: url('../../images/www/chatbot/icon_close.png') no-repeat center;
}

.chatbot-input-field {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    resize: none;
    height: 42px;
    line-height: 20px;
    background: #f7f8fc;
    transition: border-color 0.2s;
}

.chatbot-input-field:focus {
    border-color: #4a64f5;
    background: #fff;
}

.chatbot-input-field::placeholder {
    color: #aaa;
}

.chatbot-input-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #4a64f5;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s;
    padding-top: 2px;
    padding-right: 3px;
}

.chatbot-input-send:hover {
    background: #3a54e5;
}

.chatbot-input-send:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.chatbot-input-send svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.chatbot-formatted p {
    font-size: 14px;
    color: #333;
    line-height: 1.7;
}

.chatbot-formatted p:last-child {
    margin-bottom: 0;
}

.chatbot-formatted strong {
    font-weight: 600;
    color: #222;
}

.chatbot-formatted .chatbot-heading {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #4a64f5;
    margin: 8px 0 4px 0;
}

.chatbot-formatted .chatbot-heading:first-child {
    margin-top: 0;
}

.chatbot-formatted em {
    font-style: italic;
}

.chatbot-formatted code {
    background: #f0f1f5;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
}

.chatbot-formatted ul,
.chatbot-formatted ol {
    margin: 4px 0 8px 0;
    padding-left: 18px;
}

.chatbot-formatted ul:last-child,
.chatbot-formatted ol:last-child {
    margin-bottom: 0;
}

.chatbot-formatted li {
    margin-bottom: 3px;
    line-height: 1.5;
}

.chatbot-formatted li:last-child {
    margin-bottom: 0;
}

.chatbot-ft .chatbot-info {
  font-size: 12px;
  color: #696969;
  text-align: center;
  margin-top: 10px;
}
