@font-face {
    font-family: 'jf-openhuninn';
    src: url('./fonts/jf-openhuninn-2.1.ttf') format('truetype');
    font-display: swap;
}

body {
    font-family: 'jf-openhuninn', 'Noto Sans TC', 'PingFang HK', 'Microsoft JhengHei', sans-serif !important;
}

body,
html {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: 'jf-openhuninn', 'Noto Sans TC', 'PingFang HK', 'Microsoft JhengHei', sans-serif;
    background: #E2FBFF;
}

.input-wrapper {
    display: flex;
    align-items: center;
}

.warning-message {
    font-size: 12px;
    color: #9A9A9A;
    padding: 8px;
    border-radius: 4px;
    text-align: center;
    opacity: 0.9;
    width: 100%;
    box-sizing: border-box;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 10px 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid #dcecff;
}

.user-name {
    font-size: 16px;
    color: #019ABA;
    font-weight: 500;
}

#chat-container {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message {
    margin: 4px 0;
    padding: 10px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
}

.user-message {
    align-self: flex-end;
    background: #fff;
    color: #019ABA;
    padding: 10px;
    border-radius: 15px;
    border-bottom-right-radius: 0;
    max-width: 60%;
    word-wrap: break-word;
    font-size: 16px;
    line-height: 1.6;
    border: 1px solid #BBEFF7;
}

.bot-message {
    opacity: 0;
    animation: fadeIn 0.5s forwards;
    align-self: flex-start;
    background-color: #6CBFD0;
    color: #fff;
    border-bottom-left-radius: 0;
    font-size: 16px;
    line-height: 1.6;
}

#input-container {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border-radius: 30px;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 20px 20px 0 20px;
}



#user-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 5px 10px;
    margin-right: 10px;
    border-radius: 20px;
    color: #9A9A9A !important;
    font-family: 'jf-openhuninn', 'Noto Sans TC', 'PingFang HK', 'Microsoft JhengHei', sans-serif !important;
}

#user-input::placeholder {
    color: #9A9A9A !important;
    opacity: 1;
}

#send-button {
    width: 42px;
    height: 42px;
    background-color: #FFD467;
    border: none;
    border-radius: 50%;
    display: flex !important;
    visibility: visible !important;
    position: relative;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}

#send-button:hover {
    background-color: #6CBFD0;
}

.send-icon {
    width: 18px;
    height: 18px;
}

#chat-container::-webkit-scrollbar {
    width: 8px;
}

#chat-container::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    animation: typing 1.5s infinite;
    display: inline-block;
}

.dot:nth-child(1) {
    animation-delay: 0s;
}

.dot:nth-child(2) {
    animation-delay: 0.3s;
}

.dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes typing {
    0% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }

    100% {
        opacity: 0.3;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


#rating-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 1000;
}

.rating-popup-content {
    text-align: center;
}

#star-rating {
    margin: 10px 0;
}

.star {
    font-size: 30px;
    cursor: pointer;
    color: gray;
    transition: color 0.3s;
}

#submit-rating {
    background-color: #FFD467;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

#submit-rating:hover {
    background-color: #6CBFD0;
}

#refresh-button {
    width: 40px;
    height: 40px;
    font-size: 24px;
    background-color: #f0f0f0;
    border: none;
    color: #019ABA;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    right: 20px;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    transition: background-color 0.3s;
    padding: 0;
    min-width: 40px;
    min-height: 40px;
}

#refresh-button:hover {
    background-color: #FFD467;
}

.link-button {
    background-color: #007bff;
    color: white;
    padding: 8px 12px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
}

.link-button:hover {
    background-color: #0056b3;
}
