/* ==============================================
   CSS cho Region Results V2 - Layout 2 cột
   ============================================== */

/* ===================== DESKTOP STYLES ===================== */
.region-container-v2 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    font-family: Arial, sans-serif;
}

/* Header */
.region-header-v2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.region-title-v2 {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.region-issue-list-v2 {
    display: flex;
    gap: 10px;
}

.region-issue-list-v2 span {
    padding: 8px 16px;
    background: #f0f0f0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
}

.region-issue-list-v2 span:hover,
.region-issue-list-v2 span.active {
    background: #4a90d9;
    color: #fff;
}

/* Grid 2 cột */
.region-grid-v2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Province Card */
.province-card-v2 {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

/* Card Header */
.card-header-v2 {
    background: linear-gradient(135deg, #4a90d9, #357abd);
    padding: 12px 15px;
}

.province-name-v2 {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

/* Card Body */
.card-body-v2 {
    padding: 15px;
}

/* Draw Info */
.draw-info-v2 {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.draw-turn-v2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
}

.turn-select-v2 {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}

/* Special Prize */
.special-prize-v2 {
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.special-prize-v2 .label-v2 {
    font-size: 12px;
    color: #888;
    display: block;
    margin-bottom: 5px;
}

.special-title-v2 {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.special-balls-v2 {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ball-v2 {
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    background: linear-gradient(145deg, #4a90d9, #357abd);
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Results Table */
.results-table-v2 {
    margin-bottom: 15px;
}

.results-table-v2 table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.results-table-v2 thead th {
    background: #f5f5f5;
    padding: 8px;
    text-align: center;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid #ddd;
}

.results-table-v2 tbody tr {
    border-bottom: 1px solid #eee;
}

.results-table-v2 tbody tr:hover {
    background: #f9f9f9;
}

.results-table-v2 tbody tr.special-row {
    background: #fff9e6;
}

.prize-name-v2 {
    padding: 8px 10px;
    font-weight: 500;
    color: #555;
    white-space: nowrap;
    width: 100px;
    text-align: left;
}

.prize-numbers-v2 {
    padding: 8px 10px;
    text-align: center;
}

.prize-numbers-v2 span {
    display: inline-block;
    margin: 2px 5px;
    font-weight: 500;
    color: #333;
}

.prize-numbers-v2.special-number span {
    color: #e53935;
    font-size: 18px;
    font-weight: bold;
}

.dau-col-v2 {
    padding: 8px;
    text-align: center;
    font-weight: bold;
    color: #4a90d9;
    background: #f0f7ff;
    width: 40px;
    border-left: 2px solid #ddd;
}

.duoi-col-v2 {
    padding: 8px;
    text-align: left;
    color: #e53935;
    font-weight: 500;
    width: 80px;
}

/* Card Footer */
.card-footer-v2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.next-draw-v2 {
    font-size: 13px;
    color: #666;
}

.next-draw-v2 span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.history-btn-v2 {
    padding: 8px 20px;
    background: linear-gradient(135deg, #4a90d9, #357abd);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.history-btn-v2:hover {
    background: linear-gradient(135deg, #357abd, #2868a3);
    box-shadow: 0 2px 6px rgba(74, 144, 217, 0.4);
}

/* Loading & No Data */
.region-grid-v2 .loading,
.no-data-v2 {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* ===================== MOBILE STYLES ===================== */
.region-container-mobile-v2 {
    padding: 10px;
    background: #f5f5f5;
}

.region-header-mobile-v2 {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.region-title-mobile-v2 {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0 0 12px;
    text-align: center;
}

.region-issue-list-mobile-v2 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.region-issue-list-mobile-v2 span {
    padding: 6px 14px;
    background: #f0f0f0;
    border-radius: 15px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

.region-issue-list-mobile-v2 span.active {
    background: #4a90d9;
    color: #fff;
}

/* Mobile List */
.region-list-mobile-v2 {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Mobile Card */
.province-card-mobile-v2 {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-header-mobile-v2 {
    background: linear-gradient(135deg, #4a90d9, #357abd);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.province-name-mobile-v2 {
    color: #fff;
    font-weight: bold;
    font-size: 14px;
}

.date-mobile-v2 {
    color: rgba(255,255,255,0.9);
    font-size: 12px;
}

.card-body-mobile-v2 {
    padding: 12px 15px;
}

/* Mobile Special Prize */
.special-prize-mobile-v2 {
    text-align: center;
    margin-bottom: 12px;
}

.special-balls-mobile-v2 {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ball-mobile-v2 {
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    background: linear-gradient(145deg, #4a90d9, #357abd);
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    border-radius: 50%;
}

/* Mobile Detail Toggle */
.detail-toggle-mobile-v2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #4a90d9;
}

.toggle-icon-mobile {
    font-weight: bold;
    font-size: 16px;
}

/* Mobile Detail Content */
.detail-content-mobile-v2 {
    padding: 10px 0;
}

.prize-row-mobile-v2 {
    display: flex;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.prize-row-mobile-v2.special {
    background: #fff9e6;
    margin: 0 -15px;
    padding: 8px 15px;
}

.prize-name-mobile-v2 {
    width: 60px;
    font-size: 12px;
    color: #666;
    flex-shrink: 0;
}

.prize-nums-mobile-v2 {
    flex: 1;
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.prize-nums-mobile-v2.special-num {
    color: #e53935;
    font-size: 14px;
    font-weight: bold;
}

.no-data-mobile-v2 {
    text-align: center;
    padding: 30px;
    color: #999;
}

/* ===================== RESPONSIVE ===================== */
@media screen and (max-width: 992px) {
    .region-grid-v2 {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .region-container-v2 {
        display: none;
    }
    .region-container-mobile-v2 {
        display: block;
    }
}

@media screen and (min-width: 769px) {
    .region-container-v2 {
        display: block;
    }
    .region-container-mobile-v2 {
        display: none;
    }
}

/* ===================== ANIMATIONS ===================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.province-card-v2,
.province-card-mobile-v2 {
    animation: fadeIn 0.3s ease-out;
}

/* ===================== CONTROL PANEL V2 ===================== */
.control-panel-v2 {
    background: #f8f9fa;
    padding: 10px 15px;
    margin-top: 10px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.control-panel-v2 .config_view {
    float: left;
}

.control-panel-v2 .config_view form {
    background-color: transparent;
    padding: 0;
    margin: 0;
}

.control-panel-v2 .config_view label {
    margin: 0 8px 0 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}

.control-panel-v2 .config_view label input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.control-panel-v2 .config-highlight-v2 {
    float: right;
    display: flex;
    gap: 5px;
}

.control-panel-v2 .config-highlight-v2 .hl_number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e0e0e0, #f5f5f5);
    border: 1px solid #ccc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    transition: all 0.2s ease;
}

.control-panel-v2 .config-highlight-v2 .hl_number:hover,
.control-panel-v2 .config-highlight-v2 .hl_number.active {
    background: linear-gradient(145deg, #ffeb3b, #4caf50);
    color: #000;
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.4);
}

/* Highlight styles for numbers */
.results-table-v2 .prize-numbers-v2 > span.hl-active {
    background: linear-gradient(145deg, #ffeb3b, #4caf50);
    color: #000;
    border-radius: 3px;
}

/* Mobile Control Panel */
@media screen and (max-width: 768px) {
    .control-panel-v2 {
        padding: 8px 10px;
    }

    .control-panel-v2 .config_view {
        float: none;
        margin-bottom: 10px;
        text-align: center;
    }

    .control-panel-v2 .config-highlight-v2 {
        float: none;
        justify-content: center;
    }

    .control-panel-v2 .config_view label {
        font-size: 12px;
        margin: 0 5px;
    }

    .control-panel-v2 .config-highlight-v2 .hl_number {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}
