/* ===================================
   LIVE LOTTERY NUMBER ANIMATIONS
   =================================== */

/* Số random - màu xanh và tối ưu performance */
.number-random {
    color: #1a0dab !important;
    font-weight: 700;
    display: inline-block;
    will-change: opacity;
    transition: opacity 0.2s ease-out;
}

/* Mã đặc biệt random - màu xanh */
.lv-random {
    color: #1a0dab !important;
    font-weight: 700;
    display: inline-block;
    will-change: opacity;
    transition: opacity 0.2s ease-out;
}

/* Hiệu ứng mượt mà khi số thay đổi - nhẹ nhàng và tự nhiên */
@keyframes numberChange {
    0% {
        opacity: 0.7;
    }
    50% {
        opacity: 0.85;
    }
    100% {
        opacity: 1;
    }
}
.spinner-border {
    margin: 5px;
}
.number-changing {
    animation: numberChange 0.25s ease-out;
}

/* ===================================
   LOTTERY NUMBER ITEM STYLING
   =================================== */

/* Đảm bảo các cell trong bảng căn chỉnh đều từ trên xuống */
.kq-table.xsmn td,
.kq-table.xsmt td,
.kq-table.xsmb td {
    vertical-align: top;
}

/* Styling cho lottery-number-item để hiển thị số đẹp và đều */
/* Vì .number có float: left và width: 100%, các lottery-number-item sẽ xếp dọc tự nhiên */
.kq-table .number .lottery-number-item {
    display: block;
    text-align: right;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    clear: both;
    min-height: 1.5em;
}

/* Căn chỉnh phù hợp với từng vùng */
.kq-table.xsmn .number .lottery-number-item,
.kq-table.xsmt .number .lottery-number-item {
    text-align: right;
}

.kq-table.xsmb .number .lottery-number-item {
    text-align: center;
}

/* Đảm bảo số trong lottery-number-item có font và style đúng từ parent .number */
.kq-table .number .lottery-number-item {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    font-family: inherit;
}

/* Spinner trong lottery-number-item - căn giữa theo text-align */
.kq-table .number .lottery-number-item .spinner-border {
    display: inline-block;
    margin: 0;
    vertical-align: middle;
}

/* Number random trong lottery-number-item */
.kq-table .number .lottery-number-item .number-random {
    display: inline-block;
}

/* Đảm bảo .number span có clearfix để không bị lệch layout */
.kq-table .number::after {
    content: "";
    display: table;
    clear: both;
}

/* ===================================
   COUNTDOWN TIMER & DRAWING STATUS
   =================================== */

.breadcrumb-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.countdown-timer {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 0px 0px;
    /* background-color: #f8f9fa; */
    border-radius: 4px;
    font-size: 16px;
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 0;
}

/* Desktop countdown - chỉ hiển thị trên xl+ */
@media (min-width: 1200px) {
    .countdown-timer.d-xl-block[style*="display: flex"],
    .countdown-timer.d-xl-block[style*="display:flex"],
    .countdown-timer.d-xl-block[style*="display: flex !important"],
    .countdown-timer.d-xl-block[style*="display:flex !important"] {
        display: flex !important;
    }
    
    /* Ẩn mobile countdown trên desktop */
    .d-xl-none .countdown-timer {
        display: none !important;
    }
}

/* Mobile countdown - chỉ hiển thị trên < xl */
@media (max-width: 1199px) {
    .countdown-timer:not(.d-xl-block)[style*="display: flex"],
    .countdown-timer:not(.d-xl-block)[style*="display:flex"],
    .countdown-timer:not(.d-xl-block)[style*="display: flex !important"],
    .countdown-timer:not(.d-xl-block)[style*="display:flex !important"] {
        display: flex !important;
    }
    
    /* Ẩn desktop countdown trên mobile */
    .countdown-timer.d-xl-block {
        display: none !important;
    }
}

.countdown-label {
    font-weight: 500;
    color: #000000;
    font-size: 16px;
}

.countdown-value {
    font-weight: 700;
    color: #d10000;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.drawing-status {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 0px;
    /* background-color: #fff3cd; */
    border-radius: 4px;
    font-size: 16px;
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 0;
}

/* Desktop drawing status - chỉ hiển thị trên xl+ */
@media (min-width: 1200px) {
    .drawing-status.d-xl-block[style*="display: flex"],
    .drawing-status.d-xl-block[style*="display:flex"],
    .drawing-status.d-xl-block[style*="display: flex !important"],
    .drawing-status.d-xl-block[style*="display:flex !important"] {
        display: flex !important;
    }
    
    /* Ẩn mobile drawing status trên desktop */
    .d-xl-none .drawing-status {
        display: none !important;
    }
}

/* Mobile drawing status - chỉ hiển thị trên < xl */
@media (max-width: 1199px) {
    .drawing-status:not(.d-xl-block)[style*="display: flex"],
    .drawing-status:not(.d-xl-block)[style*="display:flex"],
    .drawing-status:not(.d-xl-block)[style*="display: flex !important"],
    .drawing-status:not(.d-xl-block)[style*="display:flex !important"] {
        display: flex !important;
    }
    
    /* Ẩn desktop drawing status trên mobile */
    .drawing-status.d-xl-block {
        display: none !important;
    }
}

.drawing-text {
    font-weight: 600;
    color: #d10000;
    font-size: 16px;
}

/* Dấu đỏ nhấp nháy */
.blinking-red {
    animation: blinkRed 1s infinite;
    display: inline-block;
}

@keyframes blinkRed {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.9);
    }
}

/* ===================================
   MOBILE RESPONSIVE
   =================================== */

/* Mobile countdown/drawing status - hiển thị trước phần position-* */
.d-xl-none .countdown-timer,
.d-xl-none .drawing-status {
    width: 100%;
    justify-content: center;
    margin-left: 0;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .breadcrumb-nav {
        gap: 8px;
        flex-wrap: wrap;
        align-items: flex-start;
        width: 100%;
    }
    
    .breadcrumb-nav > .d-flex {
        gap: 0;
        margin-bottom: 0;
    }
    
    .lottery-date-form {
        display: none !important;
    }
    
    .kqxs__tree {
        width: 100%;
        order: 1;
        margin-bottom: 0;
        font-size: 14px;
        flex: 0 0 100%;
    }
    
    .countdown-timer {
        padding: 0px;
        font-size: 14px;
        gap: 4px;
        margin-left: 0;
        order: 2;
        min-width: auto;
        width: auto;
        flex: 0 0 auto;
    }
    
    .countdown-label {
        font-size: 16px;
    }
    
    .countdown-value {
        font-size: 16px;
        letter-spacing: 0.3px;
    }
    
    .drawing-status {
        padding: 0px;
        font-size: 14px;
        gap: 4px;
        margin-left: 0;
        order: 2;
        min-width: auto;
        width: auto;
        flex: 0 0 auto;
    }
    
    .drawing-text {
        font-size: 1.05rem;
    }
}
/* 
@media (max-width: 480px) {
    .breadcrumb-nav {
        gap: 6px;
    }
    
    .kqxs__tree {
        font-size: 14px;
    }
    
    .countdown-timer {
        font-size: 14px;
        padding: 3px 6px;
        gap: 3px;
    }
    
    .countdown-label {
        font-size: 9px;
    }
    
    .countdown-value {
        font-size: 14px;
    }
    
    .drawing-status {
        font-size: 9px;
        padding: 3px 6px;
        gap: 3px;
    }
    
    .drawing-text {
        font-size: 9px;
    }
} */

