@keyframes slideInAi {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
@keyframes slideInUser {
    from {
        transform: translateX(-40px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
/* 1920px 등 기본 화면에서 채팅창 커지는 애니메이션 */
@keyframes expandChatContainer {
    from {
        width: 0;
        height: 0;
        bottom: 153px;
        right: 324px;
        opacity: 0;
    }
    to {
        width: 1300px;
        height: 700px;
        bottom: 153px;
        right: 324px;
        opacity: 1;
    }
}

/* 1920px 등 기본 화면에서 채팅창 작아지는 애니메이션 */
@keyframes collapseChatContainer {
    from {
        width: 1300px;
        height: 800px;
        bottom: 153px;
        right: 324px;
        opacity: 1;
    }
    to {
        width: 0;
        height: 0;
        bottom: 153px;
        right: 324px;
        opacity: 0;
    }
}

/* 2560px 등 기본 화면에서 채팅창 커지는 애니메이션 */
@keyframes expandChatContainerBig {
    from {
        width: 0;
        height: 0;
        right: 651px;
        bottom: 137px;
        opacity: 0;
    }
    to {
        width: 1300px;
        height: 800px;
        right: 651px;
        bottom: 137px;
        opacity: 1;
    }
}

/* 2560px 등 기본 화면에서 채팅창 작아지는 애니메이션 */
@keyframes collapseChatContainerBig {
    from {
        width: 1300px;
        height: 800px;
        right: 651px;
        bottom: 137px;
        opacity: 1;
    }
    to {
        width: 0;
        height: 0;
        right: 651px;
        bottom: 137px;
        opacity: 0;
    }
}


/* 3840px 등 기본 화면에서 채팅창 커지는 애니메이션 */
@keyframes expandChatContainerVeryBig {
    from {
        width: 0;
        height: 0;
        right: 1285px;
        bottom: 152px;
        opacity: 0;
    }
    to {
        width: 1300px;
        height: 800px;
        right: 1285px;
        bottom: 152px;
        opacity: 1;
    }
}

/* 3840px 등 기본 화면에서 채팅창 작아지는 애니메이션 */
@keyframes collapseChatContainerVeryBig  {
    from {
        width: 1300px;
        height: 800px;
        right: 1285px;
        bottom: 152px;
        opacity: 1;
    }
    to {
        width: 0;
        height: 0;
        right: 1285px;
        bottom: 152px;
        opacity: 0;
    }
}


#chatbot-container {
    z-index: 9990;
    position: fixed;
    width: 0;
    height: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
}
.chatbot-container.expand {
    animation: expandChatContainer 0.5s ease-out forwards; /* 확장 애니메이션 */
}

.chatbot-container.collapse {
    animation: collapseChatContainer 0.5s ease-out forwards; /* 축소 애니메이션 */
}
#chatbot-container .chat-header {
    color: black;
    padding: 9px;
    text-align: left;
    font-size: 18px;
    display: flex;
    gap: 10px;
    align-items: center;
    border-bottom: 0.5px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
#chatbot-container .chat-header .report-button {
    all: unset;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #1c9cd8; /* visang 계열 파란색 */
    color: white;
    padding: 0.1rem 1.3rem 0.1rem 0.1rem;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.2s ease, transform 0.1s ease;
    cursor: pointer;
}
#chatbot-container .chat-header .report-button .report-img {
    background-image: url("/images/chatbot/btn-show-report-80.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 3.2rem;
    height: 3.1rem;
}
#chatbot-container .chat-header .report-button .btn-name {
    font-size: 1.3rem;
}
#chatbot-container .chat-header .logo-img {
    height: 30px;
    margin-right:77%;
}
#chatbot-container .chat-header .close-pop {
    width: 25px;
    height: 25px;
    cursor:pointer;
}
#chatbot-container .chat-box {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}
#chatbot-container .chat-box .bot-message-container {
    align-self: flex-start;
}
#chatbot-container .chat-box .extra-container {
    display: flex;
    align-content: center;
    gap: 2%;
    align-items: center;
    justify-content: flex-end;
}
#chatbot-container .chat-box .extra-container .time{
    padding-bottom: 1.2%;
    margin-right: 2%;
}
#chatbot-container .chat-box .extra-container .feedback-buttons button{
    all:unset;/*기본 버튼 스타일 전부 제거*/
    cursor: pointer;
}
#chatbot-container .chat-box .loading {
    display: block; /* inline-block → block 으로 변경 */
    width: 100px;
    height: 100px;
    min-height: 100px; /* 강제로 높이 유지 */
    background: url('/images/chatbot/character_bouncy_loading.gif') no-repeat center center;
    background-size: 100% 100%; /* contain → 확실하게 채우기 */
}
#chatbot-container .chat-box::-webkit-scrollbar {
    width: 6px; /* 스크롤바 너비 */
}

#chatbot-container .chat-box::-webkit-scrollbar-thumb {
    background-color: #ccc; /* 스크롤바 색상 */
    border-radius: 10px; /* 스크롤바 모서리 둥글게 */
}

#chatbot-container .chat-box::-webkit-scrollbar-track {
    background: transparent; /* 스크롤바 트랙(배경) */
}
#chatbot-container .chat-box .chat-message {
    position: relative;
    padding: 0.8rem;
    margin: 0.4rem;
    border-radius: 0.4rem;
    word-wrap: break-word;
    background: #e9ecef;
    color: black;
    align-self: flex-start;
    display: inline-block;
}

#chatbot-container .chat-box .chat-message.bot-message img {
    max-width: 20%;
    height: auto;
    margin-top: 0.2rem;
}

#chatbot-container .chat-box .chat-message.bot-message {
    animation: slideInAi 0.3s ease-out;
}
#chatbot-container .chat-box .chat-message.user-message {
    background: #007bff;
    color: white;
    align-self: flex-end;
    animation: slideInUser 0.3s ease-out;
}
#chatbot-container .chat-box .message-time {
    color: #696969;
    font-size: 12px;
    margin-left: 8px;
}
#chatbot-container .chat-box .user-message .message-time {
    margin-left: 0;
    margin-right: 8px;
}

#chatbot-container .chat-input {
    display: flex;
    border-top: 1px solid #ccc;
    padding: 10px;
    align-items: center;
}
#chatbot-container .chat-input input {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 5px;
    outline: none;
}
#chatbot-container .chat-input button {
    outline: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}
#chatbot-container .chat-input button img {
    width: 30px;
    height: 30px;
}
#open-chatbot-btn {
    cursor: pointer;
    position: fixed;
    bottom: 105px;
    right: 228px;
    background: url(/images/chatbot/ingbot.png) no-repeat center;
    background-size: contain;
    width: 100px;
    height: 100px;
}
@media (min-width: 2560px) {
    #open-chatbot-btn  {
        right: 543px;
        bottom: 107px;
        width: 100px;
        height: 100px;
    }
    .chatbot-container.expand {
        animation: expandChatContainerBig 0.5s ease-out forwards; /* 확장 애니메이션 */
    }

    .chatbot-container.collapse {
        animation: collapseChatContainerBig 0.5s ease-out forwards; /* 축소 애니메이션 */
    }
}

@media (min-width: 3840px) {
    #open-chatbot-btn {
        right: 1179px;
        bottom: 105px;
        width: 100px;
        height: 100px;
    }
    .chatbot-container.expand {
        animation: expandChatContainerVeryBig 0.5s ease-out forwards; /* 확장 애니메이션 */
    }

    .chatbot-container.collapse {
        animation: collapseChatContainerVeryBig 0.5s ease-out forwards; /* 축소 애니메이션 */
    }
}