/* Đồng bộ Inter với client/header.php (file này tải trước block style trong header) */
html,
body {
    font-family: Inter, system-ui, sans-serif;
}

/* Bảng có chiều cao cố định: mobile dùng dvh tránh tràn; desktop giữ công thức cũ */
.main-height-table {
    min-height: 12rem;
    max-height: min(70dvh, 70vh);
    height: min(52dvh, 52vh);
}
@media (min-width: 992px) {
    .main-height-table {
        max-height: none;
        height: calc(100vh - 450px);
        min-height: 16rem;
    }
}

@keyframes loop-slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.order-latest {
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: hidden;
    position: relative;
    padding: 0;
    white-space: nowrap;
}

.order-latest:before, .order-latest:after {
    position: absolute;
    top: 0;
    width: min(250px, 22vw);
    height: 100%;
    content: "";
    z-index: 2;
}
@media (max-width: 639px) {
    .order-latest:before, .order-latest:after {
        width: 2.5rem;
    }
}

.order-latest .order-latest-list {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    animation: 150s loop-slide infinite linear;
}

.order-latest .order-latest-list.to-right {
    animation-direction: reverse;
}

.order-latest .order-latest-list img {
    max-height: 100px;
    width: 50px;
    object-fit: cover;
}

.order-latest-list .order-latest-item {
    display: flex;
    align-items: start;
    min-width: min(300px, 82vw);
    min-height: 70px;
    padding: 10px 10px;
    border-radius: 5px;
}

.order-latest-list .order-latest-item .order-name {
    font-size: 14px;
    font-weight: 600;
}

.custom-crisp-icon {
    position: fixed;
    bottom: max(2.5rem, calc(env(safe-area-inset-bottom, 0px) + 1rem));
    right: max(1.25rem, env(safe-area-inset-right, 0px));
    width: 49px;
    height: 49px;
    background-image: url(../images/support.webp);
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
    z-index: 100;
    transition: all .3s ease;
}

/* Dark: thẻ ticker đơn hàng (buy.php) — nền/border đồng bộ zink */
html.dark .order-latest-list .order-latest-item.card {
    background-color: #27272a !important;
    border: 1px solid #3f3f46 !important;
    color: #e4e4e7 !important;
}
html.dark .order-latest-list .order-latest-item .order-name {
    color: #fafafa !important;
}