/* ============================================================
   LOTTERY RESULT TABLES - XSKT Theme
   ============================================================ */

/* --- Layout wrapper --- */
.xskt-homepage {
    max-width: 1320px;
    margin: 10px auto;
    padding: 0 10px;
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 10px;
    align-items: start;
}

.xskt-sidebar-left,
.xskt-sidebar-right {
   /* position: sticky; */
    top: 170px;
    z-index: 1000;
}

.xskt-content-center {
    min-width: 0;
}

/* --- Sidebar items --- */
.sidebar-section {
    background: #fff;
    border-radius: 4px;
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.sidebar-section-title {
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.sidebar-section-title .toggle-icon {
    font-size: 10px;
}

.sidebar-section-body {
    padding: 4px 0;
}

.sidebar-section-body a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: background .15s;
}

.sidebar-section-body a:hover {
    background: #fff5f0;
    color: var(--primary-color);
}

.sidebar-section-body a:last-child {
    border-bottom: none;
}

.sidebar-badge {
    background: var(--primary-color);
    color: #fff;
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 3px;
}

/* --- Sidebar lunar calendar (embedded original HTML) --- */
.sidebar-lunar-calendar {
    --lunar-base-width: 320px;
    --lunar-base-height: 500px;
    --lunar-scale: 0.875;
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 8px;
}

.sidebar-lunar-calendar .lunar-main-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    height: calc(var(--lunar-base-height) * var(--lunar-scale));
    overflow: hidden;
}

.sidebar-lunar-calendar .container-lich {
    width: var(--lunar-base-width);
    max-width: var(--lunar-base-width);
}

.sidebar-lunar-calendar .container-lich {
    transform: scale(var(--lunar-scale));
    transform-origin: top center;
}

.sidebar-lunar-calendar .rounded-lg {
    overflow: hidden;
}

@supports (zoom: 1) {
    .sidebar-lunar-calendar .container-lich {
        zoom: var(--lunar-scale);
        transform: none;
    }
}

/* --- Status Badges --- */
.status-icon.icon-check {
    color: #4caf50; /* Green */
    font-weight: bold;
}
.status-icon.icon-check i {
    font-size: 20px;
    vertical-align: middle;
}

.status-live {
    color: #d32f2f;
    font-weight: 700;
    font-size: 11px;
}
.live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #d32f2f;
    border-radius: 50%;
    margin-right: 2px;
    animation: live-blink 1s infinite;
}
@keyframes live-blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.status-time {
    background: #f9a825; /* Orange-yellow */
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.status-time i {
    font-size: 13px;
}

/* --- Region Section --- */
.region-section {
    background: #fff;
    border-radius: 4px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    overflow: hidden;
}

/* Header block (title bar in red/orange) */
.region-header {
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 8px 10px;
}

.region-header .region-name-main {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.region-title {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.region-header .region-name-sub {
    font-size: 11px;
    opacity: 0.9;
}

.region-header .province-dates {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 2px;
    font-size: 11px;
}

/* Province name headers inside <thead> (all regions) */
.lottery-table thead tr {
    border-bottom: 2px solid var(--primary-color);
}

.lottery-table .prize-label-head {
    width: 80px;
    padding: 7px 4px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    border-right: 1px solid #eee;
    white-space: nowrap;
}

.lottery-table .province-th {
    font-size: 16px;
    font-weight: 900;
    text-align: center;
    padding: 7px 4px;
    color: #333;
    border-right: 1px solid #eee;
}



.lottery-table .province-th:last-child {
    border-right: none;
}

/* --- Lottery table --- */
.lottery-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;  /* increased base font */
    table-layout: fixed;
}

.lottery-table td,
.lottery-table th {
    padding: 5px 6px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #ddd;
    word-break: break-word;
}
.lottery-table td:last-child,
.lottery-table th:last-child {
    border-right: none;
}

/* Label column: fixed width */
.lottery-table .prize-label {
    color: #333;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
    width: 80px;
    background: #f5f5f5;
}

/* Number cells */
.lottery-table .prize-numbers {
    /*line-height: 1.8;*/
    font-size: 15px;
    position: relative; /* For absolutely positioned hover bubbles */
}

/* — MB Grid Layout — */
.mb-grid {
    display: grid;
    gap: 0;
    align-items: stretch;
    justify-items: stretch;
    border-top: 1px solid #ddd;
    margin: -5px -6px; /* Offset the <td> padding to make grid touch the edges */
}

.mb-grid > * {
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 8px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ký tự row doesn't need the grid negative margin as much but let's be consistent */
.prize-ky-hieu .prize-numbers {
    padding: 5px 0;
}

.mb-col-2 { grid-template-columns: repeat(2, 1fr); }
.mb-col-2 > *:nth-child(2n) { border-right: none; }

.mb-col-3 { grid-template-columns: repeat(3, 1fr); }
.mb-col-3 > *:nth-child(3n) { border-right: none; }

.mb-col-4 { grid-template-columns: repeat(4, 1fr); }
.mb-col-4 > *:nth-child(4n) { border-right: none; }

.mb-col-6 { grid-template-columns: repeat(3, 1fr); } /* 6 items = 2 rows x 3 cols */
.mb-col-6 > *:nth-child(3n) { border-right: none; }

/* Remove bottom border for the last row in each grid */
.mb-col-2 > *:nth-last-child(-n+2),
.mb-col-3 > *:nth-last-child(-n+3),
.mb-col-4 > *:nth-last-child(-n+4),
.mb-col-6 > *:nth-last-child(-n+3) {
    border-bottom: none;
}

/* Ký tự row */
.prize-ky-hieu .prize-label {
    color: #555;
    font-weight: 600;
}
.prize-ky-hieu .prize-numbers {
    font-size: 13px;
    color: #333;
    text-align: center;
}

/* Giải bảy (MB) in primary color */
.prize-g7-mb .prize-numbers {
    color: var(--primary-color);
    font-weight: 900;
}

/* Result number highlight — DEFAULT is black bold (no color) */
.hl-number {
    font-weight: 900;
    color: #111;
    position: relative;
    display: inline-block;
    transition: all 0.2s ease;
    font-size: x-large;
}

/* 🟢 LOTO HOVER BUBBLE EFFECT 🟢 */
.hl-number.hover-active {
    position: relative;
    z-index: 10;
}

/* The floating green bubble attached to the right of the hovered number */
.hl-number.hover-active::after {
    content: attr(data-num);
    position: absolute;
    /* Center bubble horizontally over the rightmost part of the number */
    right: -10px;
    top: 50%;
    transform: translateY(-50%) scale(1.1);
    
    /* Bubble appearance */
    background: radial-gradient(circle at 30% 30%, #4caf50, #2e7d32);
    color: #fff;
    width: 1.5em; /* Larger bubble to fit the larger text */
    height: 1.5em;
    line-height: 1.5em;
    text-align: center;
    border-radius: 50%;
    font-size: 1em; /* Match original number size */
    font-weight: 900;
    
    /* Drop shadow to make it float and give it depth */
    box-shadow: 2px 3px 6px rgba(0,0,0,0.4), inset -2px -2px 4px rgba(0,0,0,0.3);
    pointer-events: none;
    z-index: 100;
    animation: bubble-pop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes bubble-pop {
    0% { transform: translateY(-50%) scale(0.5); opacity: 0; }
    100% { transform: translateY(-50%) scale(1); opacity: 1; }
}

/* Special prize (MB, MT, MN) */
.prize-db .prize-label {
    background: #d32f2f !important;
    color: #fff !important;
    font-weight: 900;
}
.prize-db .prize-numbers,
.prize-db .prize-numbers .hl-2,
.prize-db .prize-numbers .hl-number {
    color: #d32f2f !important;
    font-size: 30px !important;
    font-weight: 900;
    background: #fff5f5;
}

/* G8 row (MT, MN): red text */
.prize-g8 .prize-numbers,
.prize-g8 .prize-numbers .hl-2,
.prize-g8 .prize-numbers .hl-number {
    color: #d32f2f;
    font-weight: 900;
    font-size: 33px;
}

/* --- Random jumping number slot --- */
.num-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #4caf50;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    margin: 0 1px;
    vertical-align: middle;
    line-height: 1;
}

/* Larger slots in ĐB rows */
.prize-db .num-slot,
.prize-db-bottom .num-slot {
    width: 25px;
    height: 25px;
    font-size: 20px;
}

/* Smaller for G8 (2-digit) */
.prize-g8 .num-slot {
    width: 25px;
    height: 25px;
    font-size: 20px;
}

/* Legacy spinner for "waiting" (*****) state */
.prize-loading {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ddd;
    border-top-color: #bbbbbb;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    vertical-align: middle;
    margin: 0 3px;
}

/* Larger spinner in ĐB row */
.prize-db .prize-loading,
.prize-db-bottom .prize-loading {
    width: 19px;
    height: 19px;
    border-width: 2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.prize-loading-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    vertical-align: middle;
}

/* Kết quả đang quay - cell blink */
.drawing-label {
    background: #fff3e0;
    color: #e65c00;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    padding: 4px;
    animation: blink-bg 1.2s ease-in-out infinite;
}

@keyframes blink-bg {
    0%, 100% { background: #fff3e0; }
    50%       { background: #ffd180; }
}

/* ĐB row at bottom of MT/MN (already handled above) */

/* Day dủ link */
.day-du-row {
    text-align: center;
    padding: 5px;
    font-size: 12px;
    border-top: 1px solid #eee;
}

.day-du-row a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 4px;
}

/* --- Loto table --- */
.loto-table-wrapper {
    padding: 0 5px 5px;
}

.loto-title {
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    padding: 6px 10px;
    margin-bottom: 3px;
    border-radius: 2px;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.loto-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.loto-table th {
    background: #f8f8f8;
    padding: 4px 6px;
    text-align: center;
    font-weight: 700;
    border: 1px solid #ddd;
}

.loto-table td {
    padding: 3px 6px;
    text-align: center;
    border: 1px solid #eee;
}

.loto-table .loto-head {
    font-weight: 700;
    color: #333;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

.loto-table .loto-head.loto-head-cell:hover {
    background: #e8f5e9;
    color: #2e7d32;
}

.loto-table .loto-nums {
    color: #555;
}

.loto-table .loto-hi {
    color: var(--primary-color);
    font-weight: 700;
}

/* Interactive loto hover */
.loto-span {
    cursor: pointer;
    display: inline-block;
    padding: 1px 3px;
    margin: -1px -3px;
    border-radius: 3px;
    transition: background 0.2s, color 0.2s;
}

.loto-span:hover {
    background: #e8f5e9;
    color: #2e7d32;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 991px) {
    .xskt-homepage {
        grid-template-columns: 1fr;
    }
    .xskt-sidebar-left,
    .xskt-sidebar-right {
        display: none;
    }
}

@media (max-width: 576px) {
    .lottery-table .prize-label-head,
    .lottery-table .prize-label {
        width: 60px;
        font-size: 11px;
    }
    .lottery-table .prize-numbers {
        font-size: 13px;
    }
    .hl-number {
        font-size: 18px !important;
    }
    .prize-db .prize-numbers,
    .prize-db .prize-numbers .hl-2,
    .prize-db .prize-numbers .hl-number {
        font-size: 20px !important; /* Reduced from 24px */
        background: none !important; /* Remove background highlight on mobile to save space/clean look */
    }
    .prize-g8 .prize-numbers,
    .prize-g8 .prize-numbers .hl-2,
    .prize-g8 .prize-numbers .hl-number {
        font-size: 18px !important; /* Reduced from 22px */
    }
    .mb-grid {
        gap: 1px 2px;
    }
    .num-slot {
        width: 16px;
        height: 16px;
        font-size: 11px;
        margin: 1px;
    }
    .prize-loading {
        width: 10px;
        height: 10px;
        margin: 0 1px;
    }
    .prize-loading-wrapper {
        flex-wrap: wrap;
        width: 100%;
    }
}

/* --- Display Mode Toggle (Compact) --- */
.display-mode-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 8px 0;
    padding-top: 8px;
    border-top: 1px dotted #eee;
}

.mode-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 400;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-btn:hover {
    background: #f8f8f8;
    border-color: #ccc;
}

.mode-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: #777;
}

/* Toggle visibility inside .hl-number based on mode class set on .lottery-table or <body> */
.hl-number .v-2,
.hl-number .v-3 {
    display: none;
}

/* When the table has a specific mode set */
.lottery-table[data-display="2"] .v-full,
.lottery-table[data-display="2"] .v-3 {
    display: none;
}
.lottery-table[data-display="2"] .v-2 {
    display: inline;
}

.lottery-table[data-display="3"] .v-full,
.lottery-table[data-display="3"] .v-2 {
    display: none;
}
.lottery-table[data-display="3"] .v-3 {
    display: inline;
}

/* --- Quick Statistics (Thống kê nhanh) --- */
.quick-stats-box {
    margin-top: 15px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    font-family: Arial, sans-serif;
}

.quick-stats-header {
    background: linear-gradient(to right, #42abe4, #3761b3);
    color: #fff;
    padding: 12px 15px;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
}

.quick-stats-header span {
    font-size: 24px !important; /* Dashicon size */
}

.quick-stats-section {
    border-bottom: 1px solid #eee;
}

.quick-stats-section:last-child {
    border-bottom: none;
}

.quick-stats-subtitle {
    background: #d1d1d1;
    padding: 5px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.quick-stats-subtitle span {
    color: #d32f2f; /* Highlight "nhiều", "biến" etc */
}

.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: #fff;
}

.quick-stats-item {
    padding: 5px 5px;
    text-align: center;
    font-size: 16px;
    border-right: 1px solid #d8d5d5;
    border-bottom: 1px solid #d8d5d5;
}

.quick-stats-item:nth-child(5n) {
    border-right: none;
}

.quick-stats-item:last-child {
    border-bottom: none;
}

.quick-num {
    font-weight: 700;
    color: #d32f2f !important;
}

.quick-val {
    color: #666;
}

@media (max-width: 768px) {
    .quick-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .quick-stats-item:nth-child(2n) {
        border-right: none;
    }
}

/* ============================================================
   ĐIỆN TOÁN 123 STYLES
   ============================================================ */
.dt-title {
    font-size: 22px;
    font-weight: 700;
    color: #d32f2f;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Filter Form Refinement */
.dt-filter-form {
    background: #fff;
    border: 1px solid #eef0f2;
    padding: 8px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    margin-bottom: 8px;
}

.dt-filter-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: flex-end;
}

.dt-filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Adjusted sizes to fit one row */
.date-item { flex: 0 0 200px; }
.days-item { flex: 0 0 70px; }
.dt-weekday-item { flex: 0 0 140px; }
.submit-item { flex: 1 0 140px; }

.dt-filter-label {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.dt-input {
    height: 44px;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 16px;
    color: #333;
    background: #f8fafc;
    transition: all 0.25s ease;
    width: 100%;
    outline: none;
}

#home-results-ajax-wrapper {
    transition: opacity 0.3s ease;
    min-height: 400px; /* Prevent jumpy height during loading */
}

/* Optional: Add a subtle pulse animation if you want to be extra premium */
@keyframes xsktPulse {
    0% { opacity: 0.5; }
    50% { opacity: 0.3; }
    100% { opacity: 0.5; }
}

#home-results-ajax-wrapper[style*="opacity: 0.5"] {
    animation: xsktPulse 1.5s infinite ease-in-out;
}

.dt-input:focus {
    border-color: #0062ff;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 98, 255, 0.1);
}

.dt-input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.dt-input-with-icon i {
    position: absolute;
    left: 14px;
    color: #5d6d7e;
    font-size: 18px;
    z-index: 1;
}

.dt-input-with-icon .dt-input {
    padding-left: 42px;
}

.dt-input-days {
    text-align: center;
    padding: 0;
}

.dt-select-wrapper {
    position: relative;
    width: 100%;
}

.dt-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 35px;
}

.dt-select-wrapper::after {
    content: '\f347';
    font-family: dashicons;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #5d6d7e;
    pointer-events: none;
}

.dt-btn-submit {
    height: 44px;
    background: #d3141d;
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    padding: 0 25px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
    width: 100%;
}

.dt-btn-submit:hover {
    background: #cc4d1e;
}

.dt-btn-submit:active {
    transform: scale(0.98);
}

/* Premium Flatpickr Adjustment */
.flatpickr-calendar {
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
    margin-top: 5px !important;
    overflow: hidden;
    font-family: inherit;
}

/* Ensure header wrapper expands to contain custom elements */
.flatpickr-months {
    height: auto !important;
    display: block !important;
}

.flatpickr-month {
    height: auto !important;
    display: block !important;
    position: relative !important;
    padding: 0 !important;
}

/* Custom Month and Year Selectors */
.flatpickr-current-month {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 5px 0 15px 0 !important; /* Added bottom padding for gap */
    height: auto !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
}

.flatpickr-monthDropdown-months,
.flatpickr-year-dropdown {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background: #f8f9fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center !important;
    border: 1px solid #e0e6ed !important;
    border-radius: 6px !important;
    padding: 4px 28px 4px 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.flatpickr-monthDropdown-months {
    margin-right: 12px !important; /* Added gap */
}

.flatpickr-year-dropdown {
    width: 85px !important;
    padding-right: 24px !important;
}

.flatpickr-monthDropdown-months:hover,
.flatpickr-year-dropdown:hover {
    background-color: #f1f3f5 !important;
    border-color: #d1d9e4 !important;
}

.numInputWrapper {
    width: 75px !important; /* Increased width */
    background: #f8f9fa !important;
    border: 1px solid #e0e6ed !important;
    border-radius: 6px !important;
    overflow: hidden;
    transition: all 0.2s;
}

.numInputWrapper:hover {
    border-color: #d1d9e4 !important;
}

.numInputWrapper input.cur-year {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
    padding: 4px 10px !important; /* Better padding */
}

.numInputWrapper .arrowUp, 
.numInputWrapper .arrowDown {
    display: none !important; /* Hide default small arrows for cleaner look */
}

.dt-flatpickr-header {
    background: #fff;
    text-align: center;
    padding: 15px 0 5px;
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
}

.dt-flatpickr-footer {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-top: 1px solid #f1f3f5;
    background: #fff;
}

.dt-fp-btn {
    flex: 1;
    height: 40px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.dt-fp-btn-today {
    background: #1d58d8;
    color: #fff;
}

.dt-fp-btn-today:hover {
    background: #1648b5;
    box-shadow: 0 4px 12px rgba(29, 88, 216, 0.2);
}

.dt-fp-btn-clear {
    background: #fff;
    color: #333;
    border: 1px solid #e0e6ed;
}

.dt-fp-btn-clear:hover {
    background: #f8fafc;
    border-color: #cbd5e0;
}

.flatpickr-day.selected {
    background: #ff6600 !important;
    border-color: #ff6600 !important;
    border-radius: 50px !important;
}

.flatpickr-current-month {
    font-weight: 800 !important;
    color: #1a1a1a !important;
    font-size: 110% !important;
}

.flatpickr-weekday {
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase;
    font-size: 12px !important;
}

.flatpickr-months .flatpickr-prev-month, 
.flatpickr-months .flatpickr-next-month {
    padding: 12px !important;
    color: #64748b !important;
}

.flatpickr-months .flatpickr-prev-month:hover svg, 
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #1d58d8 !important;
}

/* Navigation mode (Vietlott): keep horizontal on mobile */
@media (max-width: 768px) {
    .xskt-unified-form[data-mode="navigation"] .dt-filter-row {
        gap: 6px;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .xskt-unified-form[data-mode="navigation"] .dt-filter-item {
        margin: 0 !important;
    }
    .xskt-unified-form[data-mode="navigation"] .dt-nav-arrows {
        gap: 4px;
        flex-wrap: nowrap;
    }
    .xskt-unified-form[data-mode="navigation"] .dt-nav-btn {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }
    .xskt-unified-form[data-mode="navigation"] .dt-nav-btn i {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }
    .xskt-unified-form[data-mode="navigation"] .date-item {
        flex: 0 0 128px;
    }
    .xskt-unified-form[data-mode="navigation"] .date-item .dt-input {
        height: 36px;
        font-size: 13px;
        padding-right: 8px;
    }
    .xskt-unified-form[data-mode="navigation"] .date-item .dt-input-with-icon i {
        left: 10px;
        font-size: 14px;
    }
    .xskt-unified-form[data-mode="navigation"] .date-item .dt-input-with-icon .dt-input {
        padding-left: 30px;
    }
}

/* Filter mode (Điện Toán): stack vertically for multiple controls */
@media (max-width: 768px) {
    .xskt-unified-form[data-mode="filter"] .dt-filter-row {
        display: grid;
        grid-template-columns: minmax(100px, 1.2fr) minmax(70px, 0.7fr) minmax(95px, 1fr);
        gap: 8px;
        align-items: end;
    }
    .xskt-unified-form[data-mode="filter"] .date-item, 
    .xskt-unified-form[data-mode="filter"] .days-item, 
    .xskt-unified-form[data-mode="filter"] .dt-weekday-item, 
    .xskt-unified-form[data-mode="filter"] .submit-item {
        min-width: 0;
    }
    .xskt-unified-form[data-mode="filter"] .dt-filter-label {
        font-size: 12px;
        line-height: 1.2;
    }
    .xskt-unified-form[data-mode="filter"] .dt-input {
        height: 38px;
        font-size: 13px;
    }
    .xskt-unified-form[data-mode="filter"] .days-item .dt-input {
        padding: 0 8px;
    }
    .xskt-unified-form[data-mode="filter"] .date-item .dt-input-with-icon i {
        left: 10px;
        font-size: 14px;
    }
    .xskt-unified-form[data-mode="filter"] .date-item .dt-input-with-icon .dt-input {
        padding-left: 30px;
    }
    .xskt-unified-form[data-mode="filter"] .submit-item {
        grid-column: 1 / -1;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        justify-self: stretch;
        margin-top: 2px;
    }
    .xskt-unified-form[data-mode="filter"] .dt-btn-submit {
        width: auto;
        min-width: 170px;
        max-width: 220px;
        height: 38px;
        font-size: 14px;
        padding: 0 20px;
        margin: 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(180deg, #d3141d 0%, #c10f17 100%);
    }
    .xskt-unified-form[data-mode="filter"] .dt-btn-submit:hover {
        background: linear-gradient(180deg, #bf131b 0%, #ac0f16 100%);
    }
}

.dt-result-box {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.dt-box-header {
    background: #ef5350;
    color: #fff;
    padding: 8px 15px;
}


.ball-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #e8e8e8 40%, #c0c0c0 100%);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15), inset -2px -2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 800;
    color: #2c3e50;
    border: 1px solid #d0d0d0;
    position: relative;
    user-select: none;
}

/* Shine effect */
.ball-item::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 10px;
    width: 15px;
    height: 10px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    filter: blur(2px);
}

/* Loading state inside ball */
.ball-loading::after {
    content: "";
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: #d32f2f;
    border-radius: 50%;
    animation: ball-spin 1s linear infinite;
}

@keyframes ball-spin {
    to { transform: rotate(360deg); }
}

/* Spinning numbers slot adaptation */
.ball-item .num-slot {
    background: transparent;
    color: #2c3e50;
    font-size: 26px;
    width: 100%;
    height: 100%;
    margin: 0;
    box-shadow: none;
}

@media (max-width: 576px) {
    .d123-balls {
        gap: 15px !important;
    }
    .ball-item {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .ball-item .num-slot {
        font-size: 20px;
    }
}

.ball-special {
    margin-left: 10px;
}
.ball-special .ball-item {
    background: linear-gradient(145deg, #ffc107, #ff9800);
    color: #fff;
    border-color: #ff9800;
}

.d123-balls { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; } 

/* Vietlott Prize Table */
.vt-prize-table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}
.vt-prize-table th {
    background: #e5e7eb;
    color: #4b5563;
    padding: 8px;
    text-align: center;
    border: 1px solid #d1d5db;
    font-weight: 600;
}
.vt-prize-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #d1d5db;
    vertical-align: middle;
}
.vt-prize-table .prize-name {
    text-align: left;
    font-weight: 600;
    color: #1f2937;
    padding-left: 15px;
}
.vt-prize-table .prize-amount {
    color: #111827;
    font-weight: 600;
}

/* Matching Dots */
.dot-indicator {
    display: inline-flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e5e7eb;
    display: inline-block;
    border: 1px solid #d1d5db;
}
.dot.active {
    background: #9ca3af;
}
.dot.special {
    background: #ef4444;
}

.xskt-count-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #d7dbe2;
    border-top-color: #c65120;
    animation: ball-spin 0.9s linear infinite;
    vertical-align: middle;
}

/* Vietlott Result Box Refinement */
.vt-box-header {
    background: #f87171;
    color: #fff;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px 4px 0 0;
}
.vt-box-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}
.vt-box-meta {
    background: #fff;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    color: #4b5563;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
}
.vt-box-meta b {
    color: #111827;
}
.vt-box-content {
    background: #fff;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-top: 0;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

@media (max-width: 576px) {
    #vietlott-live-box .vt-box-content {
        padding: 12px;
    }

    #vietlott-live-box .vt-prize-table {
        margin-top: 12px;
        background: transparent;
        border-collapse: separate;
        border-spacing: 0;
    }

    #vietlott-live-box .vt-prize-table thead {
        display: none;
    }

    #vietlott-live-box .vt-prize-table,
    #vietlott-live-box .vt-prize-table tbody,
    #vietlott-live-box .vt-prize-table tr,
    #vietlott-live-box .vt-prize-table td {
        display: block;
        width: 100%;
    }

    #vietlott-live-box .vt-prize-table tr {
        background: #fff;
        border: 1px solid #f0b2b7;
        border-radius: 10px;
        padding: 8px 10px;
        margin-bottom: 10px;
        box-shadow: 0 2px 8px rgba(175, 26, 34, 0.08);
    }

    #vietlott-live-box .vt-prize-table td {
        border: 0;
        padding: 4px 0;
        text-align: left;
        font-size: 14px;
    }

    #vietlott-live-box .vt-prize-table .prize-name {
        font-size: 22px;
        font-weight: 700;
        color: #c31922;
        padding: 2px 0 8px;
        margin-bottom: 4px;
        border-bottom: 1px solid #f6d8db;
    }

    #vietlott-live-box .vt-prize-table td[data-label] {
        position: relative;
        padding-left: 96px;
        min-height: 26px;
    }

    #vietlott-live-box .vt-prize-table td[data-label]::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: 4px;
        width: 90px;
        color: #111827;
        font-weight: 500;
    }

    #vietlott-live-box .dot-indicator {
        justify-content: flex-start;
    }

    #vietlott-live-box .dot {
        width: 16px;
        height: 16px;
        border-color: #d3d6de;
    }

    #vietlott-live-box .dot.active {
        background: #c0141d;
        border-color: #c0141d;
    }

    #vietlott-live-box .prize-amount {
        color: #c0141d;
        font-size: 22px;
        font-weight: 700;
        letter-spacing: 0.2px;
    }
}


/* Power 6/55 Separators */
.ball-sep {
    width: 1px;
    height: 36px;
    background: #d1d5db;
    margin: 0 10px;
    align-self: center;
}
.dot-sep {
    width: 1px;
    height: 12px;
    background: #d1d5db;
    margin: 0 4px;
    display: inline-block;
    vertical-align: middle;
}

.ball-item.ball-special { background: radial-gradient(circle at 35% 35%, #ff8a80 0%, #ef5350 40%, #b71c1c 100%) !important; color: #fff !important; border-color: #b71c1c !important; box-shadow: 0 4px 8px rgba(183, 28, 28, 0.3), inset -2px -2px 4px rgba(0,0,0,0.2); }

/* --- Load More Button --- */
.load-more-wrapper { padding: 20px; text-align: center; }
.btn-load-more {
    background: #fff;
    border: 1px solid #d32f2f;
    color: #d32f2f;
    padding: 10px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
    width: 100%;
    display: block;
}
.btn-load-more:hover {
    background: #d32f2f;
    color: #fff;
}
#load-more-spinner {
    margin-top: 10px;
    color: #d32f2f;
    font-weight: bold;
}

/* ============================================================
   HOME SCHEDULE & WEEKDAY FILTER
   ============================================================ */

/* --- Home Schedule Matrix --- */
.home-schedule-container {
    margin-bottom: 12px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.schedule-col {
    border-right: 1px solid #eee;
}

.schedule-col:last-child {
    border-right: none;
}

.schedule-header {
    background: #ef5350;
    color: #fff;
    text-align: center;
    padding: 8px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 5px;
}

.home-schedule-container-outer {
    background: #fff;
    margin-bottom: 8px;
    border-radius: 5px;
}

.schedule-list {
    padding: 0;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    min-height: 40px;
}

.schedule-item:last-child {
    border-bottom: none;
}

.schedule-item.empty {
    visibility: hidden;
}

.province-link {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.province-link:hover {
    color: #ef5350;
    text-decoration: none;
}

.status-wrap {
    font-size: 11px;
}

.status-time {
    background: #ff9100;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-time .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.status-live {
    color: #fdfdfd;
    background: #d32f2f;
    font-weight: 700;
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 12px;
    align-items: center;
    gap: 4px;
    animation: blink-soft 1.5s infinite;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: #fdfdfd;
    border-radius: 50%;
}

.status-icon.icon-check {
    color: #4caf50;
    font-weight: 700;
}
.status-icon.icon-check .dashicons {
    font-size: 20px;
}

/* --- Weekday Filter --- */
.weekday-filter-container {
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #ff9100; /* Orange border as per sample */
    border-radius: 5px;
    overflow: hidden;
}

.weekday-filter-row {
    display: flex;
    flex-wrap: nowrap;
}

.weekday-filter-row .weekday-item {
    flex: 1;
    text-align: center;
    padding: 10px 5px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    border-right: 1px solid #ff9100;
    transition: all 0.2s;
    font-weight: 500;
}

.weekday-filter-row .weekday-item:last-child {
    border-right: none;
}

.weekday-filter-row .weekday-item:hover {
    background: #fff4e5;
    color: #ff6d00;
}

.weekday-filter-row .weekday-item.active {
    background: #ff9100;
    color: #fff;
    font-weight: 700;
}

/* --- Sidebar Status Indicators --- */
.sidebar-status {
    flex-shrink: 0;
    margin-left: 8px;
    font-size: 11px;
    display: flex;
    align-items: center;
}

.sidebar-status .status-time {
    background: #ff9100;
    padding: 1px 6px;
    border-radius: 10px;
}

.sidebar-status .dashicons {
    font-size: 13px !important;
    width: 13px !important;
    height: 13px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-status .status-icon.icon-check .dashicons {
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
}

.sidebar-status .status-live {
    font-size: 10px;
}

@keyframes blink-soft {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

@media (max-width: 576px) {
    .schedule-header { font-size: 12px; padding: 6px; }
    .schedule-item { padding: 6px 8px; min-height: 34px; }
    .province-link { font-size: 12px; }
    .status-time { font-size: 10px; padding: 1px 6px; }

    .weekday-filter-container {
        overflow: hidden;
    }
    .weekday-filter-row {
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        width: 100%;
    }
    .weekday-filter-row .weekday-item {
        flex: none;
        width: auto;
        min-width: 0;
        max-width: none;
        font-size: 10px;
        line-height: 1.15;
        padding: 8px 2px;
        white-space: normal;
        word-break: keep-all;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
