/* Khung chat Trợ lý Ngọc Rồng Hoa Sen (góc phải dưới) */
.nro-chat {
    position: fixed;
    z-index: 1100;
    right: 18px;
    bottom: 18px;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
    color: #142535;
}

.modern-site .nro-chat button {
    font: inherit;
    cursor: pointer;
}

.modern-site .nro-chat .nro-chat-nut {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-left: auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #2c7dc8, #19568f);
    box-shadow: 0 10px 26px rgba(14, 54, 92, .38);
    color: #ffffff;
    transition: transform .15s ease;
}

.modern-site .nro-chat .nro-chat-nut:hover {
    transform: scale(1.06);
}

.modern-site .nro-chat .nro-chat-nut .bi {
    font-size: 26px !important;
    line-height: 1;
}

.nro-chat .nro-chat-khung {
    display: flex;
    flex-direction: column;
    width: 370px;
    max-width: calc(100vw - 24px);
    height: 540px;
    max-height: calc(100vh - 110px);
    max-height: calc(100dvh - 110px);
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid #c0e3ed;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 46px rgba(14, 54, 92, .28);
}

.nro-chat .nro-chat-khung[hidden] {
    display: none;
}

.nro-chat .nro-chat-dau {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(120deg, #0e365c, #195994);
    color: #ffffff;
}

.nro-chat .nro-chat-dau img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f2fcff;
    object-fit: contain;
    padding: 2px;
}

.nro-chat .nro-chat-ten {
    flex: 1;
    min-width: 0;
}

.nro-chat .nro-chat-ten strong {
    display: block;
    font-size: 16px !important;
}

.nro-chat .nro-chat-ten span {
    display: block;
    font-size: 12.5px !important;
    opacity: .85;
}

.modern-site .nro-chat .nro-chat-dong {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .14);
    color: #ffffff;
}

.modern-site .nro-chat .nro-chat-dong:hover {
    background: rgba(255, 255, 255, .26);
}

.nro-chat .nro-chat-tin {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
    background: #f5fdff;
    overscroll-behavior: contain;
}

.nro-chat .nro-chat-dong-tin {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 10px;
}

.nro-chat .nro-chat-dong-tin--toi {
    align-items: flex-end;
}

.nro-chat .nro-chat-bong {
    max-width: 88%;
    padding: 9px 12px;
    border: 1px solid #c0e3ed;
    border-radius: 14px 14px 14px 4px;
    background: #ffffff;
    font-size: 15px !important;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.nro-chat .nro-chat-dong-tin--toi .nro-chat-bong {
    border-color: #2571b8;
    border-radius: 14px 14px 4px 14px;
    background: #2571b8;
    color: #ffffff;
}

.nro-chat .nro-chat-tieu-de {
    display: block;
    margin-bottom: 4px;
    color: #19568f;
    font-weight: 700;
}

body.modern-site .nro-chat .nro-chat-bong a {
    color: #2571b8;
    font-weight: 600;
    text-decoration: underline;
}

body.modern-site .nro-chat .nro-chat-dong-tin--toi .nro-chat-bong a {
    color: #84e4ff;
}

.nro-chat .nro-chat-nguon {
    display: block;
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px dashed #b3cde6;
    font-size: 13.5px !important;
}

.nro-chat .nro-chat-chon {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 96%;
    margin-top: 6px;
}

.nro-chat .nro-chat-nhan {
    width: 100%;
    color: #56697a;
    font-size: 12.5px !important;
}

.modern-site .nro-chat .nro-chat-chon button {
    padding: 6px 11px;
    border: 1px solid #a3c5e4;
    border-radius: 999px;
    background: #ffffff;
    color: #19568f;
    font-size: 13.5px !important;
    font-weight: 600;
    text-align: left;
}

.modern-site .nro-chat .nro-chat-chon button:hover:not(:disabled) {
    background: #e9f3fd;
}

.modern-site .nro-chat .nro-chat-chon button:disabled {
    opacity: .55;
    cursor: default;
}

.nro-chat .nro-chat-danh-gia {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    color: #56697a;
    font-size: 12.5px !important;
}

.modern-site .nro-chat .nro-chat-danh-gia button {
    padding: 0 2px;
    border: 0;
    background: none;
    color: #798c9e;
    font-size: 11.5px !important;
}

.modern-site .nro-chat .nro-chat-danh-gia button:hover {
    color: #2571b8;
}

.nro-chat .nro-chat-cho .nro-chat-bong {
    color: #56697a;
    font-style: italic;
}

.nro-chat .nro-chat-nhap {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #c0e3ed;
    background: #ffffff;
}

.modern-site .nro-chat .nro-chat-nhap input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #b3cde6;
    border-radius: 999px;
    background: #ffffff;
    color: #142535;
    font-size: 16px !important;
}

.modern-site .nro-chat .nro-chat-nhap input[type="text"]:focus {
    border-color: #2571b8;
    outline: 2px solid rgba(37, 113, 184, .2);
}

.modern-site .nro-chat .nro-chat-nhap button {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #2571b8;
    color: #ffffff;
}

.modern-site .nro-chat .nro-chat-nhap button:disabled {
    opacity: .5;
    cursor: default;
}

.nro-chat .nro-chat-moi {
    position: absolute;
    right: 70px;
    bottom: 8px;
    display: flex;
    align-items: center;
    width: max-content;
    max-width: calc(100vw - 100px);
    border: 1px solid #a3c5e4;
    border-radius: 16px 16px 4px 16px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(14, 54, 92, .24);
    transform-origin: right bottom;
    animation: nro-chat-moi-hien .5s cubic-bezier(.34, 1.56, .64, 1) both, nro-chat-moi-nhun 2.4s ease-in-out .6s infinite;
}

.modern-site .nro-chat .nro-chat-moi-chu {
    padding: 10px 6px 10px 14px;
    border: 0;
    background: none;
    color: #142535;
    font-size: 15px !important;
    font-weight: 700;
    text-align: left;
}

.modern-site .nro-chat .nro-chat-moi-dong {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin-right: 5px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #56697a;
}

.modern-site .nro-chat .nro-chat-moi-dong:hover {
    background: #e9f3fd;
    color: #19568f;
}

.modern-site .nro-chat.nro-chat--dang-moi .nro-chat-nut {
    animation: nro-chat-nut-goi 1.8s ease-out infinite;
}

@keyframes nro-chat-moi-hien {
    from { opacity: 0; transform: scale(.55) translateX(14px); }
    to { opacity: 1; transform: none; }
}

@keyframes nro-chat-moi-nhun {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes nro-chat-nut-goi {
    0% { box-shadow: 0 10px 26px rgba(14, 54, 92, .35), 0 0 0 0 rgba(37, 113, 184, .6); }
    70% { box-shadow: 0 10px 26px rgba(14, 54, 92, .35), 0 0 0 18px rgba(37, 113, 184, 0); }
    100% { box-shadow: 0 10px 26px rgba(14, 54, 92, .35), 0 0 0 0 rgba(37, 113, 184, 0); }
}

@media (max-width: 520px) {
    .nro-chat { right: 12px; bottom: 12px; }
    .nro-chat .nro-chat-moi { right: 66px; max-width: calc(100vw - 84px); }
    .modern-site .nro-chat .nro-chat-moi-chu { padding-left: 12px; font-size: 14px !important; }
}
