:root {
    --color-primary: #193963;
    --color-secondary: #88b82e;
    --color-tertiary: #083791;
    --color-quaternary: #083791;
    --color-background: #f3f7fa;
    --color-background-alt: #89b92e;
    --color-background-special-page: #F8F9FF;
    --color-white: #ffffff;
    --color-red: rgba(255, 0, 0, 0.31);
    --color-black: #000000;
    --color-text: #123663;
    --color-text-secondary: #565069;
    --color-light-blue: #0758C8;
    --color-text-light: #e6edf4;
    --color-yellow: rgba(251, 117, 0, .2);
    --nav-bar-height: 65px;
    --color-fade: #A7B0B4;
    --text-color-secondary: #07001E;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: inherit;
}

body,
html {
    line-height: 1.6rem;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    box-sizing: border-box;
}

font {
    font-family: 'Roboto', sans-serif !important;
    box-sizing: border-box;
}
a {
    text-decoration: none;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

p {
    margin: 0;
}

/* button */
button {
    border: none;
    background-color: var(--color-white);
}
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 111px;
    height: 40px;
    font-size: 14px;
    font-weight: 400;
    border-radius: 5px;
    text-transform: uppercase;
    background-color: var(--color-primary);
    color: var(--color-white);
    cursor: pointer;
    transition: 0.3s ease-in-out;
}
.btn-primary:hover {
    background-color: var(--color-background-alt) !important;
}

.btn-green {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-transform: uppercase;
    background-color: var(--color-background-alt);
    color: var(--color-white);
    width: 110px;
    height: 36px;
    border-radius: 4px;
    margin-top: 16px;
    cursor: pointer;
    transition: 0.3s ease-in-out;
    outline: none!important;
}
.btn-green:hover{
    opacity: 0.7;
}
.btn-secondary-color{
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-transform: uppercase;
    background-color: var(--color-background-alt);
    color: var(--color-white);
    border-radius: 4px;
    margin-top: 16px;
    cursor: pointer;
    transition: 0.3s ease-in-out;
    outline: none!important;
}
.btn-secondary-color:hover{
    opacity: 0.7;
}
.btn-secondary {
    font-size: 14px;
    font-weight: 400;
    padding: 2px 20px 0;
    height: 100%;
    border-radius: 3px;
    background-color: #EEF1F6;
    color: var(--color-primary);
    cursor: pointer;
}
.btn-secondary:hover {
    background-color: var(--color-background-alt);
    color: var(--color-white)
}
.btn-secondary.active {
    color: var(--color-white);
    background-color: var(--color-background-alt);
}


.app hr {
    border: 1px solid #f3f7fa;
    opacity: 1;
}

/* button back to top */
.back-to-top,
.btn-message {
    position: fixed;
    right: 16px;
    border-radius: 50%;
    background-color: var(--color-background-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.5s ease forwards; 
    z-index: 99;
}

.back-to-top {
    bottom: 196px;
    width: 40px;
    height: 40px;
    right: 26px;
    display: none;
}

.back-to-top img {
    margin-top: -2px;
    margin-right: -2px;
}

.btn-message {
    bottom: 128px;
    width: 60px;
    height: 60px;
}

/* animation */
@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes show {
    from {
        opacity: 0;
    } to {
        opacity: 1;
    }
}

/* scroll bar */
html ::-webkit-scrollbar {
    border-radius: 0px;
    width: 8px;
}

html *::-webkit-scrollbar {
    border-radius: 0;
    width: 8px;
}

html ::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: rgba(22, 24, 35, 0.2);
}

html *::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: rgba(22, 24, 35, 0.2);
}

html ::-webkit-scrollbar-track {
    border-radius: 0px;
    background-color: rgba(0, 0, 0, 0);
}

html *::-webkit-scrollbar-track {
    border-radius: 0;
    background-color: rgba(0, 0, 0, 0);
}

/* --- css common --- */
.c-pointer {
    cursor: pointer !important;
}

/* text */
.text-primary {
    color: var(--color-text) !important;
}
.text-secondary {
    color: var(--color-secondary) !important;
}
.text-tertiary{
    color: var(--color-tertiary) !important;
}
.text-green {
    color: var(--color-secondary) !important;
}
.text-light {
    color: var(--color-text-light) !important;
}
.text-white {
    color: var(--color-white) !important;
}
.text-red{
    color: var(--color-red) !important;
}
.text-fade{
    color: var(--color-fade) !important;
}
.fs-7 {
    font-size: 0.875rem !important;
}
.fs-8 {
    font-size: 0.8125rem !important;
}
.fs-9 {
    font-size: 0.75rem !important;
}

.fw-900 {
    font-weight: 900 !important;
}

/* background */
.bg-primary {
    background-color: var(--color-primary) !important;
}
.bg-green {
    background-color: var(--color-background-alt) !important;
}
.bg-white {
    background-color: var(--color-white) !important;
}
.bg-light {
    background-color: var(--color-background) !important;
}

/* flex */
.gap-1 {
    gap: 0.25rem;
}
.gap-2 {
    gap: 0.5rem;
}
.gap-3 {
    gap: 1rem;
}
.gap-4 {
    gap: 1.5rem;
}
.gap-5 {
    gap: 2rem;
}
.gap-6 {
    gap: 2.5rem;
}

/* hover */
.hover_up{
    transition: transform .2s, box-shadow .2s;
}

.hover_up:hover{
    transform: translateY(-4px);
    box-shadow: 0 4px 8px #0000001a;
}
/* form */
.form_word{
    border: 0!important;
    border-bottom: 1px solid var(--color-primary)!important;
    border-radius: unset!important;
    outline: none!important;
    box-shadow: none!important;
}


/* pagination */
.pagination-disable{
    background-color: var(--color-fade)!important;
    border-color: #ccc!important;
    color: var(--color-text-light) !important;
}
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.pagination-btn {
    color: #757F95;
    font-size: 20px;
    background-color: var(--color-white);
    border: 1px solid #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 38px;
    transition: .3s ease;
}

.pagination-btn:hover {
    color: var(--color-white);
    background-color: var(--color-primary);
}

.pagination-page {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-current {
    width: 60px;
    height: 38px;
    text-align: right;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    padding: 4px;
    color: var(--color-primary);
}

.pagination-page hr {
    width: 1px;
    height: 20px;
    background-color: #757F95;
    margin: 0;
    opacity: 1;
    transform: rotate(15deg);
}

.pagination-total {
    font-size: 16px;
    font-weight: 500;
    color: #757F95;
}

/* Cấu hình hộp chat */
.chatbox {
    position: fixed;
    bottom: 128px;
    right: 16px;
    /*height: calc(250px + 30vh);*/
    display: none;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    /*min-height: 150px; !* Đảm bảo chiều cao tối thiểu *!*/
    z-index: 1000;
    overflow: hidden;
    animation: slideUpFromBottom 0.5s ease forwards;
}

/* Header của chatbox */
.chatbox-header {
    /*cursor: move; !* Khu vực kéo di chuyển *!*/
    background: var(--color-secondary);
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd; /* Thêm đường viền cho rõ ràng */
}

/* Nút đóng chatbox */
.chatbox-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

/* Phần nội dung chính của chatbox */
.chatbox-body {
    /*height: calc(100% - 50px); !* Trừ đi chiều cao của header *!*/
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Cuộn nội dung nếu tràn */
}

/* Các tin nhắn trong chatbox */
.chatbox-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

/* Các tin nhắn của người dùng */
.chat-message {
    margin: 5px 0;
    padding: 10px;
    border-radius: 5px;
    max-width: 100%; /* Cho phép tin nhắn chiếm tối đa chiều rộng */
    word-wrap: break-word; /* Cắt từ dài thành nhiều dòng */
}

/* Tin nhắn của người dùng (màu sắc) */
.user-message {
    background-color: #007bff;
    color: white;
    align-self: flex-end; /* Tin nhắn người dùng nằm về phía bên phải */
}

/* Tin nhắn của hệ thống (màu sắc) */
.system-message {
    background-color: #f1f1f1;
    color: black;
    align-self: flex-start; /* Tin nhắn của hệ thống nằm về phía bên trái */
}

/* Các câu hỏi lựa chọn */
.questions-container {
    display: flex;
    overflow-x: auto;
    padding: 10px 0;
}

.chat-option {
    margin-right: 10px;
}

/* Đảm bảo khi ô nhập văn bản có focus thì nó sẽ không bị viền sáng */
#chatInput:focus {
    border-color: var(--color-fade) !important;
    box-shadow: none;
    outline: none !important;
}
.btn-chat-box-link{
    border-top: 1px solid #e8e8e8;
    background: transparent;
    color: var(--color-primary);
    transition: 0.2s ease-in-out;
}
.btn-chat-box-link-middle{
    border-left: 1px solid #e8e8e8;
    border-right: 1px solid #e8e8e8;
}
.btn-chat-box-link:hover{
    background: #e8e8e8;
    opacity: 0.9;
}
/* Thêm hiệu ứng động cho chatbox khi mở lên */
@keyframes slideUpFromBottom {
    0% {
        transform: translateY(100%);
    }
    100% {
        transform: translateY(0);
    }
}
