/*
 * kqxs-frontend.css — ĐÃ OVERRIDE theo theme Lokhung247.info
 * Extension plugin CSS: bảng MN/MT multi-tỉnh, thống kê, link tỉnh
 */

/* ============================================================
   BẢNG MIỀN NAM / MIỀN TRUNG (multi-tỉnh .tb-kq)
============================================================ */
.tb-kq {
    border-collapse: collapse;
    width: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: #fff;
    border: 1px solid #d0d8e8;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
    font-size: 13px;
}

.tb-kq th,
.tb-kq td {
    border: 1px solid #e8eef8;
    padding: 6px 8px;
    text-align: center;
    vertical-align: middle;
    font-size: 13px;
}

/* Header tiêu đề (title row) */
.tb-kq .title,
td.title {
    background: linear-gradient(135deg,#0057b8,#003d8f) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-align: center !important;
    padding: 9px 14px !important;
    border: none !important;
    letter-spacing: 0.3px !important;
}

/* Màu XSMT: xanh lá */
.tb-kq.tb-kq-mt .title,
td.title.mt {
    background: linear-gradient(135deg,#0a8a3c,#065f2a) !important;
}

/* Màu XSMN: đỏ */
.tb-kq.tb-kq-mn .title,
td.title.mn {
    background: linear-gradient(135deg,#d62828,#a81e1e) !important;
}

/* Dòng tên tỉnh (row thứ 2) */
.tb-kq tr:nth-child(2) td,
.tb-kq tr:nth-child(2) th {
    background: #eef3fb;
    color: #0057b8;
    font-weight: 700;
    font-size: 12px;
}

/* Row xen kẽ */
.tb-kq tbody tr:nth-child(even) td { background: #f4f8ff; }
.tb-kq tbody tr:nth-child(odd) td  { background: #fff; }

/* Giải đặc biệt */
.tb-kq .text-danger,
.tb-kq td.text-danger,
.tb-kq tr:last-child td {
    color: #d62828 !important;
    font-weight: 700 !important;
    font-size: 15px !important;
}

/* Số trong bảng */
.tb-kq b, .tb-kq strong { font-weight: 700; }

/* Text primary */
.text-primary { color: #0057b8 !important; }
.text-danger  { color: #d62828 !important; }
.text-center  { text-align: center !important; }
.text-uppercase { text-transform: uppercase; }
.font-weight-bold { font-weight: 700; }
.middle { vertical-align: middle !important; }
.no-wrap { white-space: nowrap; }
.m2lr { margin: 0 4px; }
.cotGiai { width: 56px; font-weight: 700; }
.haiCol   { width: 50%; float: left; box-sizing: border-box; }
.baCol    { width: 33.3333%; float: left; box-sizing: border-box; }
.bonCol   { width: 25%; float: left; box-sizing: border-box; }

/* ============================================================
   THỐNG KÊ EXTENSION (stats tables)
============================================================ */
.kqxs-ext-stat-wrap {
    margin-bottom: 16px;
    overflow-x: auto;
}

.kqxs-ext-stat-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #d0d8e8;
    border-radius: 6px;
    overflow: hidden;
    font-size: 13px;
}

.kqxs-ext-stat-table th {
    background: linear-gradient(135deg,#0057b8,#003d8f);
    color: #fff;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    border: none;
}

.kqxs-ext-stat-table td {
    padding: 7px 10px;
    border: 1px solid #e8eef8;
    text-align: center;
    vertical-align: middle;
    font-size: 13px;
}
.kqxs-ext-stat-table tbody tr:nth-child(even) td { background: #f4f8ff; }
.kqxs-ext-stat-table tbody tr:nth-child(odd)  td { background: #fff; }
.kqxs-ext-stat-table td strong { color: #d62828; font-weight: 700; font-size: 14px; }
.kqxs-ext-stat-table .giai-db {
    color: #fff; background: #d62828;
    padding: 2px 7px; border-radius: 4px;
}

/* ============================================================
   LINK TỈNH (lk247-tinh-link)
============================================================ */
.lk247-tinh-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
}
.lk247-tinh-link {
    display: inline-block;
    font-size: 12px;
    padding: 4px 11px;
    border-radius: 12px;
    font-weight: 600;
    transition: opacity .18s;
    text-decoration: none !important;
    line-height: 1.5;
}
.lk247-tinh-link.blue  { background:#eef3fb; color:#0057b8; }
.lk247-tinh-link.green { background:#dcfce7; color:#166534; }
.lk247-tinh-link.red   { background:#fee2e2; color:#991b1b; }
.lk247-tinh-link:hover { opacity:.8; }

/* ============================================================
   BOX WRAPPER (lk247-plugin-box)
============================================================ */
.lk247-plugin-box {
    background: #fff;
    border: 1px solid #d0d8e8;
    border-radius: 6px;
    margin-bottom: 16px;
    overflow: hidden;
}
.lk247-plugin-box-hd {
    color: #fff;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
}
.lk247-plugin-box-hd.blue  { background: linear-gradient(135deg,#0057b8,#003d8f); }
.lk247-plugin-box-hd.green { background: linear-gradient(135deg,#0a8a3c,#065f2a); }
.lk247-plugin-box-hd.red   { background: linear-gradient(135deg,#d62828,#a81e1e); }
.lk247-plugin-box-hd.gold  { background: linear-gradient(135deg,#c17f00,#8f5a00); }

/* ============================================================
   PROMO BAR
============================================================ */
.kqxs-promo-bar {
    background: #fffbee;
    border: 1px solid #e8d8a0;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 8px;
}
.kqxs-promo-bar a { color: #d62828; font-weight: 700; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 600px) {
    .tb-kq th, .tb-kq td { padding: 4px 5px; font-size: 11px; }
    .cotGiai { width: 32px; }
    .lk247-tinh-link { font-size: 11px; padding: 3px 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .lk247-tinh-link { transition: none; }
}


/* ============================================================
   kqxs-result-table — bảng 1 tỉnh VÀ nhiều tỉnh (XSMT/XSMN)
============================================================ */
.kqxs-result-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
    table-layout: fixed;
}
.kqxs-result-table th {
    background: #0057b8;
    color: #fff;
    padding: 8px 6px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid #003d8f;
}
.kqxs-result-table td {
    border: 1px solid #e8eef8;
    padding: 5px 6px;
    text-align: center;
    vertical-align: middle;
}
.kqxs-result-table tbody tr:nth-child(odd) td  { background: #fff; }
.kqxs-result-table tbody tr:nth-child(even) td { background: #f4f8ff; }
.kqxs-result-table tbody tr:hover td { background: #fffde7; }

/* Cột nhãn giải (G8, G7, ĐB...) */
.kqxs-row-label {
    color: #0057b8;
    font-weight: 700;
    font-size: 13px;
    width: 36px !important;
    border-right: 2px solid #d0d8e8 !important;
    background: #fafcff !important;
}

/* kqxs-num-group: nhóm số nhiều tỉnh (dạng flex dọc) */
.kqxs-num-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

/* Số thường */
.kqxs-num {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: #222;
}

/* Giải đặc biệt 1 tỉnh — to, đỏ, có viền */
.kqxs-num-special {
    display: inline-block;
    font-size: 28px;
    font-weight: 900;
    color: #d62828;
    letter-spacing: 4px;
    border: 2px solid #d62828;
    border-radius: 8px;
    padding: 4px 20px;
    background: #fff;
}

/* Giải 7 — oval viền đỏ */
.kqxs-num-g7 {
    display: inline-block;
    font-size: 17px;
    font-weight: 900;
    color: #d62828;
    border: 2px solid #d62828;
    border-radius: 40px;
    padding: 2px 12px;
    min-width: 54px;
    background: #fff;
}

/* G8 — đỏ */
.kqxs-num-g8 {
    display: inline-block;
    font-size: 15px;
    font-weight: 700;
    color: #d62828;
}

/* Giải ĐB nhiều tỉnh */
.kqxs-num-db-mn {
    display: inline-block;
    font-size: 20px;
    font-weight: 900;
    color: #d62828;
    letter-spacing: 2px;
    border: 2px solid #d62828;
    border-radius: 6px;
    padding: 3px 10px;
    background: #fff8f8;
}

@media (max-width: 600px) {
    .kqxs-num-special { font-size: 22px; letter-spacing: 2px; padding: 3px 12px; }
    .kqxs-num-g7 { font-size: 14px; padding: 2px 8px; min-width: 40px; }
    .kqxs-num-db-mn { font-size: 16px; }
    .kqxs-result-table td { padding: 4px 3px; font-size: 12px; }
    .kqxs-row-label { width: 28px !important; font-size: 11px !important; }
}