/* 전체 페이지 스타일 (스크롤 가능) */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-y: auto; /* 스크롤 가능하도록 설정 */
}

/* 이미지 컨테이너 (세로로 배치) */
.image-container {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: auto;
}

/* 이미지 스타일 (화면에 꽉 차게) */
.image-container img {
    width: 100vw;  /* 화면 너비에 맞춤 */
    height: 100vh; /* 화면 높이에 맞춤 */
    object-fit: cover; /* 이미지가 비율을 유지하면서 꽉 차도록 설정 */
}

/* Chatbot 버튼 스타일 (항상 오른쪽 하단 고정) */
.chatbot-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    z-index: 1000; /* 다른 요소보다 위에 표시되도록 설정 */
}

/* 채팅창 스타일 (고정 위치) */
.chat-container {
    width: 480px;
    height: 500px;
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    bottom: 80px;
    right: 20px;
    background-color: white;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    z-index: 999; /* 버튼보다 아래 위치하도록 설정 */
}


/* .input-box {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ccc;
}

.input-box input {
    width: 60%;  
    padding: 10px;
}


.mic-button {
    padding: 10px;
    border: none;
    background-color: #d3d3d3 !important; 
    color: black;
    cursor: pointer;
    border-radius: 5px;
    margin-right: 5px;
} */

/* 채팅 입력창 컨테이너 */
.input-box {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ccc;
    align-items: center; /* 세로 중앙 정렬 */
}

/* 채팅 입력창 (가로 최대 크기 설정) */
.input-box input {
    flex: 1; /* 입력창이 최대한 너비를 차지하도록 설정 */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 5px; /* 마이크 버튼과 간격 조정 */
}

/* 마이크 버튼 */
.mic-button {
    padding: 10px;
    border: none;
    background-color: #d3d3d3 !important; /* 연한 회색 */
    color: black;
    cursor: pointer;
    border-radius: 5px;
    margin-right: 5px; /* 送信 버튼과 간격 조정 */
}
.mic-button:hover {
    filter: brightness(70%);
}
/* 전송 버튼 (送信) */
.input-box button.send-button {
    padding: 10px;
    border: none;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    border-radius: 5px;
}
.input-box button.send-button:hover {
    filter: brightness(70%);
}

/* 채팅 메시지 스타일 */
.message {
    max-width: 75%;
    padding: 10px;
    margin: 5px;
    border-radius: 10px;
    word-wrap: break-word;
    position: relative;
}

/* 상대방 메시지 (왼쪽 정렬) */
.message.received {
    background-color: #e0e0e0;
    align-self: flex-start;
    border-radius: 15px 15px 15px 5px;
    padding: 10px;
}

/* 내가 보낸 메시지 (오른쪽 정렬) */
.message.sent {
    background-color: #4CAF50;
    color: white;
    align-self: flex-end;
    border-radius: 15px 15px 5px 15px;
    padding: 10px;
}

/* 채팅 말풍선 효과 추가 */
.message::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

/* 상대방 말풍선 꼬리 */
.message.received::after {
    border-width: 10px;
    border-color: transparent #e0e0e0 transparent transparent;
    left: -10px;
    top: 10px;
}

/* 내 메시지 말풍선 꼬리 */
.message.sent::after {
    border-width: 10px;
    border-color: transparent transparent transparent #4CAF50;
    right: -10px;
    top: 10px;
}

/* 채팅창 스크롤 */
.chat-box {
    flex: 1;
    overflow-y: auto;  /* 세로 스크롤 활성화 */
    padding: 10px;
    display: flex;
    flex-direction: column;
    max-height: 420px; /* 채팅창 높이 제한 */
    scrollbar-width: thin; /* 스크롤바 크기 조정 (Firefox) */
}

/* 스크롤바 스타일 (Chrome, Edge, Safari) */
.chat-box::-webkit-scrollbar {
    width: 6px;
}

.chat-box::-webkit-scrollbar-thumb {
    background-color: #bfbfbf;
    border-radius: 5px;
}

.chat-box::-webkit-scrollbar-track {
    background-color: #f1f1f1;
}

.thumbnail {
    width: 90%; /* 말풍선 너비보다 조금 작게 */
    max-width: 250px; /* 너무 커지지 않도록 최대 크기 제한 */
    height: auto;
    display: block;
    margin-top: 5px;
    border-radius: 8px; /* 모서리를 둥글게 */
}

.message table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.message th,
.message td {
    border: 1px solid #ccc;
    padding: 12px 16px; /* 셀 여백을 넉넉하게 */
    text-align: left;
}

.message th {
    background-color: #f5f5f5;
}

.message tr:nth-child(even) {
    background-color: #fafafa;
}
