/* ============================================
   KQXS RESULTS TABLE — Shared Layout & Typography
   ============================================ */

/* Table structure */
.lottery-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}

.KQXS-Table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}

/* Colgroup column sizing */
.kq-col-label {
  width: 90px;
}
.kq-col-value {
  width: auto;
}

/* Row gutters reset */
.row-no-gutters {
  margin-left: 0;
  margin-right: 0;
  overflow: hidden;
}

/* Flex wrap for prize cells */
.kq-prize-row-flex {
  overflow: hidden;
}
.kq-prize-row-flex::after {
  content: '';
  display: table;
  clear: both;
}

/* Auto border between adjacent prize cells */
.kq-prize-row-flex > .kq-prize-item {
  border-right: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}
.kq-prize-row-flex > .kq-prize-item.num-code {
  border: none !important;
  border-right: none !important;
  border-bottom: none !important;
}
.kq-prize-row-flex > .kq-prize-item:last-child {
  border-right: none;
}
/* For single-value prizes (100% width), hide bottom border */
.kq-prize-row-flex > .kq-prize-item[style*="width:100%"] {
  border-right: none;
  border-bottom: none;
}

/* Prize number base styles */
.kq-prize-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px 0;
  box-sizing: border-box;
  text-align: center;
  font-weight: 700;
  font-family: var(--font-number, 'Inter', 'Roboto', system-ui, sans-serif);
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
  letter-spacing: normal;
  line-height: 1.4;
  word-spacing: 4px;
}

/* Font size variants */
.kq-text-md { font-size: 16px; }
.kq-text-lg { font-size: 20px; }
.kq-text-xl { font-size: 28px; font-weight: 800; }

/* Color variants */
.kq-text-red { color: var(--clr-number-db) !important; }
.kq-text-gray { color: rgb(239 68 68 / var(--tw-text-opacity, 1)); }

/* runloto highlight */
.runloto {
  color: var(--clr-number-db);
  font-weight: 800;
}

/* ============================================
   RESPONSIVE — Ultra-wide (>= 1920px)
   ============================================ */
@media (min-width: 1920px) {
  .kq-text-md { font-size: 20px; }
  .kq-text-lg { font-size: 24px; }
  .kq-text-xl { font-size: 36px; }
  
  .kq-prize-item {
    padding: 12px 8px;
    letter-spacing: 1.5px;
    word-spacing: 8px;
  }

  .kq-prize-label {
    font-size: 16px;
    padding: 12px 20px !important;
  }
}

/* ============================================
   RESPONSIVE — Large Desktop (>= 1400px)
   ============================================ */
@media (min-width: 1400px) {
  .kq-text-md { font-size: 18px; }
  .kq-text-lg { font-size: 22px; }
  .kq-text-xl { font-size: 32px; }
  
  .kq-prize-item {
    padding: 10px 6px;
    letter-spacing: 1px;
    word-spacing: 6px;
  }

  .kq-prize-label {
    font-size: 15px;
    padding: 10px 16px !important;
  }
}

/* ============================================
   RESPONSIVE — Desktop (default / 1024px - 1399px)
   ============================================ */
@media (max-width: 1399.98px) {
  .kq-prize-label {
    width: 15%;
    min-width: 80px;
    vertical-align: middle;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px !important;
  }
  
  .kq-prize-cell {
    padding: 0 !important;
  }
}

/* ============================================
   RESPONSIVE — Tablet (768px - 1023px)
   ============================================ */
@media (max-width: 1023.98px) {
  .kq-text-md { font-size: 14px; }
  .kq-text-lg { font-size: 17px; }
  .kq-text-xl { font-size: 24px; }
  
  .kq-prize-item {
    padding: 7px 3px;
    letter-spacing: 0.5px;
    word-spacing: 3px;
  }

  .kq-prize-label {
    font-size: 13px;
    width: 18%;
    padding: 7px 8px !important;
  }
}

/* ============================================
   RESPONSIVE — Mobile (480px - 767px)
   ============================================ */
@media (max-width: 767.98px) {
  .kq-text-md { font-size: 12px; }
  .kq-text-lg { font-size: 14px; }
  .kq-text-xl { font-size: 20px; }
  
  .kq-prize-item {
    padding: 5px 2px;
    letter-spacing: 0.3px;
    word-spacing: 2px;
  }

  .kq-prize-label {
    font-size: 12px;
    width: 20%;
    min-width: 60px;
    padding: 5px 6px !important;
  }

  .kq-prize-inner,
  .kq-muted-pad {
    padding: 8px;
  }

  .kq-empty-cell {
    padding: 24px;
  }
}

/* ============================================
   RESPONSIVE — Small Mobile (< 480px)
   ============================================ */
@media (max-width: 479.98px) {
  .kq-text-md { font-size: 11px; }
  .kq-text-lg { font-size: 12px; }
  .kq-text-xl { font-size: 17px; }
  
  .kq-prize-item {
    padding: 4px 0 !important;
    gap: 0 !important;
    letter-spacing: 0;
    word-spacing: 1px;
  }

  .kq-prize-label {
    font-size: 11px;
    width: 22% !important;
    min-width: 50px !important;
    padding: 4px 4px !important;
  }
  
  .label-text {
    font-size: 11px !important;
  }
  
  .prize-label {
    width: 65px !important;
    min-width: 65px !important;
    padding: 8px 4px !important;
  }
}

/* Highlight (khoanh tròn loto) */
.kq-prize-item .skq-last2 {
    display: inline;
    transition: all 0.15s ease;
    position: relative;
    color: inherit !important;
}

.kq-prize-item.loto-hl .skq-last2 {
    background: var(--clr-loto-hl-bg, #DBEAFE);
    border: 2px solid var(--clr-loto-hl-border, #3B82F6);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.05em 0.15em;
    min-width: 1.4em;
    min-height: 1.4em;
    line-height: 1;
    text-align: center;
    color: var(--clr-loto-hl-text, #1E3A8A) !important;
    font-size: inherit;
    vertical-align: middle;
    box-sizing: content-box;
}
