﻿.m-l-a {
    margin-left: auto !important;
}

.m-l-0 {
    margin-left: 0 !important;
}

.p-15 {
    padding: 15px !important;
}

.p-20 {
    padding: 20px !important;
}

.p-l-0 {
    padding-left: 0 !important;
}

.p-l-5 {
    padding-left: 5px !important;
}

.p-l-10 {
    padding-left: 10px !important;
}

.p-l-15 {
    padding-left: 15px !important;
}

.p-r-0 {
    padding-right: 0 !important;
}

.p-r-5 {
    padding-right: 5px !important;
}

.p-r-10 {
    padding-right: 10px !important;
}

.p-r-15 {
    padding-right: 15px !important;
}

.p-t-0 {
    padding-top: 0px !important;
}

.p-t-5 {
    padding-top: 5px !important;
}

.p-t-10 {
    padding-top: 10px !important;
}

.p-t-15 {
    padding-top: 15px !important;
}

.p-b-0 {
    padding-bottom: 0px !important;
}

.p-b-5 {
    padding-bottom: 5px !important;
}

.p-b-10 {
    padding-bottom: 10px !important;
}

.p-b-15 {
    padding-bottom: 15px !important;
}

.cursor-resize {
    cursor: e-resize;
}

.cursor-pointer {
    cursor: pointer;
}

.d-flex {
    display: flex;
}

.flex-column {
    -webkit-box-orient: vertical !important;
    -webkit-box-direction: normal !important;
    -ms-flex-direction: column !important;
    flex-direction: column !important;
}

.flex-1 {
    flex: 1;
}

.jc-center {
    justify-content: center;
}

.ai-center {
    align-items: center;
}

.rounded-circle {
    border-radius: 50% !important;
}

.w100 {
    width: 100%;
}

.h100 {
    height: 100%;
}

.h100vh {
    height: 100vh;
}

small {
    font-size: 0.8rem;
}

.m-t-5 {
    margin-top: 5px !important;
}

.m-t-10 {
    margin-top: 10px !important;
}

.m-t-15 {
    margin-top: 15px !important;
}

.m-b-5 {
    margin-bottom: 5px !important;
}

.m-b-10 {
    margin-bottom: 10px !important;
}

.m-b-15 {
    margin-bottom: 15px !important;
}

.m-b-20 {
    margin-bottom: 20px !important;
}

.m-l-3 {
    margin-left: 3px !important;
}

.m-l-5 {
    margin-left: 5px !important;
}

.m-l-10 {
    margin-left: 10px !important;
}

.m-l-15 {
    margin-left: 15px !important;
}

.m-r-5 {
    margin-right: 5px !important;
}

.m-r-10 {
    margin-right: 10px !important;
}

.m-r-15 {
    margin-right: 15px !important;
}

.hidden {
    display: none !important;
}

.noselect {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently */
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.height-full {
    height: calc(100vh - 10rem);
}

@media (max-width:600px) {
    .hidden-s {
        display: none !important
    }
}

@media (min-width:601px) and (max-width:991px) {
    .hidden-m {
        display: none !important
    }
}

@media (min-width:992px) and (max-width:1199px) {
    .hidden-l {
        display: none !important
    }
}

@media (min-width:1200px) and (max-width:1668px) {
    .hidden-xl {
        display: none !important
    }
}

@media (min-width:1669px) {
    .hidden-xxl {
        display: none !important
    }
}

.b-b {
    border-bottom: var(--theme-border-solid);
}

.p-relative {
    position: relative;
}

/*AI Chat Interface Styles*/

/* Wrapper tổng, chiếm toàn vùng hiển thị */
.ai-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: calc(100vh - 100px); /* trừ header BBOS phía trên */
    background-color: #f4f7fa;
    padding: 0 30px;
}

/* Khung chính */
.ai-container {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    height: 100%;
    position: relative;
}

/* Header chat */
.ai-header {
    background: #dfe2e6;
    color: #4679cc;
    padding: 12px 20px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    text-align: left;
}
    .ai-header h5 {
        margin: 0;
        font-weight: 600;
        font-size: 1.3rem;
    }

    .ai-header .subtext {
        font-size: 0.85rem;
        opacity: 0.9;
    }

/* Vùng hội thoại chiếm hết phần còn lại */
.ai-chatbox {
    flex: 1;
    overflow-y: auto;
    padding: 15px 25px;
    background: #f9fbfd;
    scroll-behavior: smooth;
}

/* Tin nhắn người dùng */
.user-msg {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

    .user-msg .bubble {
        background-color: #7e8da5;
        color: white;
        padding: 10px 15px;
        border-radius: 16px 16px 0 16px;
        max-width: 80%;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

/* Tin nhắn AI */
.ai-msg {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
}

    .ai-msg .bubble {
        background-color: #e9f0fb;
        color: #1a1a1a;
        padding: 10px 15px;
        border-radius: 16px 16px 16px 0;
        max-width: 80%;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

/* Hiệu ứng AI đang gõ */
.typing-indicator {
    display: flex;
    align-items: center;
    justify-content: start;
}

    .typing-indicator span {
        width: 6px;
        height: 6px;
        background: #1976d2;
        border-radius: 50%;
        margin: 0 2px;
        animation: blink 1.4s infinite both;
    }

        .typing-indicator span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-indicator span:nth-child(3) {
            animation-delay: 0.4s;
        }

@keyframes blink {
    0%, 80%, 100% {
        opacity: 0.3;
    }

    40% {
        opacity: 1;
    }
}

/* --- Ô nhập liệu cố định ở đáy màn hình --- */
.ai-input {
    position: sticky; /* cố định ở đáy phần khung cha */
    bottom: 0;
    display: flex;
    align-items: center;
    background: #fff;
    border-top: 1px solid #ddd;
    border-radius: 0 0 12px 12px;
    gap: 10px;
    padding: 12px 20px;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.05);
    z-index: 10;
}
    /* Textarea rộng hơn */
    .ai-input textarea {
        flex: 2;
        border: 1px solid #ccc;
        border-radius: 20px;
        padding: 12px 18px;
        resize: none;
        font-size: 0.95rem;
        outline: none;
        min-height: 70px;
        background-color: #fff;
    }

        .ai-input textarea:focus {
            border-color: #1976d2;
            box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
        }

/* Nút gửi */
.btn-send {
    background-color: #1976d2;
    color: white;
    border: none;
    border-radius: 50%;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}


    .btn-send:hover {
        background-color: #125a9e;
    }


.error {
    color: #d32f2f;
    font-weight: 600;
}

.equal-height {
    display: flex;
    align-items: center;
    height: 100%;
}
