/* =========================================================
   DAY SEQUENCE 1..19 ADD-ON
   Visual-only layer. Existing OCR/conversion code is untouched.
   Applies to:
   8:30 AM, 9:30 AM, 10:30 AM, 11:30 AM,
   1:30 PM, 2:30 PM, 4:30 PM.
   Night 6:30/7:30/8:30 PM remains unchanged.
   ========================================================= */

.seq19-list{
  width:100%;
  display:none;
  border-top:1px solid #555;
  font-family:"Times New Roman","Khmer OS Battambang",serif;
  background:#fff;
}

body.seq19-day-active #resultCard .seq19-list,
body.seq19-daytime-active #time130Card .seq19-list{
  display:block;
}

body.seq19-day-active #resultCard > .r:not(.row-a){
  display:none!important;
}

body.seq19-daytime-active #time130Card .t130-g6,
body.seq19-daytime-active #time130Card .t130-g4-source,
body.seq19-daytime-active #time130Card #t130g3Row{
  display:none!important;
}

.seq19-row{
  display:grid;
  grid-template-columns:50px minmax(0,1fr);
  min-height:28px;
  border-bottom:1px solid #777;
}

.seq19-row:last-child{
  border-bottom:0;
}

.seq19-index{
  display:flex;
  align-items:center;
  justify-content:center;
  border-right:1px solid #777;
  font-size:14px;
  font-weight:700;
  line-height:1;
  color:#111;
}

.seq19-value{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:3px 7px;
  font-size:15px;
  font-weight:700;
  line-height:1.2;
  text-align:center;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  outline:none;
}

.seq19-value[contenteditable="true"]:focus{
  background:#fff7ed;
  box-shadow:inset 0 0 0 2px #f59e0b;
}

.seq19-empty{
  color:#444;
}

@media(max-width:520px){
  .seq19-row{
    grid-template-columns:48px minmax(0,1fr);
    min-height:27px;
  }
  .seq19-index{font-size:13px}
  .seq19-value{font-size:14px;padding:3px 5px}
}


/* V2 cleanup: empty prize rows are fully removed. */
.seq19-row[hidden]{display:none!important}

/* Cleaner compact result table. */
.seq19-row{
  grid-template-columns:42px minmax(0,1fr);
  min-height:24px;
}
.seq19-index{
  font-family:Arial,"Noto Sans Khmer",sans-serif;
  font-size:12px;
  font-weight:800;
  background:#fff;
}
.seq19-value{
  min-height:24px;
  padding:2px 8px;
  font-size:13px;
  line-height:1.2;
}
@media(max-width:520px){
  .seq19-row{grid-template-columns:40px minmax(0,1fr);min-height:23px}
  .seq19-index{font-size:11px}
  .seq19-value{min-height:23px;font-size:12px;padding:2px 6px}
}


/* =========================================================
   V3 — ALL REQUESTED DAY TIMES FINAL UI
   ========================================================= */

.seq19-v3{
  width:100%;
  margin:0;
  padding:0;
  background:#fff;
  border-top:1px solid #555;
}

.seq19-v3 .seq19-row{
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  min-height:24px;
  margin:0;
  padding:0;
  border-bottom:1px solid #777;
  background:#fff;
}

.seq19-v3 .seq19-row[hidden]{
  display:none!important;
}

.seq19-v3 .seq19-index{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:1px 3px;
  border-right:1px solid #777;
  font-family:Arial,"Noto Sans Khmer",sans-serif;
  font-size:12px;
  line-height:1;
  font-weight:800;
  color:#111;
  background:#fff;
}

.seq19-v3 .seq19-value{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  min-height:24px;
  padding:2px 7px;
  font-family:"Times New Roman","Khmer OS Battambang",serif;
  font-size:13px;
  line-height:1.15;
  font-weight:700;
  text-align:center;
  color:#111;
  background:#fff;
  outline:none;
  overflow-wrap:anywhere;
}

.seq19-v3 .seq19-value:focus{
  background:#fff7ed;
  box-shadow:inset 0 0 0 2px #f59e0b;
}

/* Hide ONLY the old prize-number blocks when the new list is active.
   A and the old B/C/D/F/I/N area stay untouched. */
body.seq19-day-active #resultCard > .r:not(.row-a){
  display:none!important;
}

body.seq19-daytime-active #time130Card .t130-g6,
body.seq19-daytime-active #time130Card .t130-g4-source,
body.seq19-daytime-active #time130Card #t130g3Row{
  display:none!important;
}

@media(max-width:520px){
  .seq19-v3 .seq19-row{
    grid-template-columns:38px minmax(0,1fr);
    min-height:23px;
  }

  .seq19-v3 .seq19-index{
    min-height:23px;
    font-size:11px;
  }

  .seq19-v3 .seq19-value{
    min-height:23px;
    padding:2px 5px;
    font-size:12px;
  }
}


/* =========================================================
   V4 — ALIGN NUMBER COLUMN WITH A ROW
   The divider of rows 1,2,3... now lines up exactly with
   the A-row divider for every requested daytime Result.
   ========================================================= */

/* 4:30 PM uses the original ticket grid: 62px | result */
body.seq19-day-active #resultCard .seq19-v3 .seq19-row{
  grid-template-columns:62px minmax(0,1fr)!important;
}

/* 8:30 / 9:30 / 10:30 / 11:30 / 1:30 / 2:30
   use the shared daytime card grid: 105px | result */
body.seq19-daytime-active #time130Card .seq19-v3 .seq19-row{
  grid-template-columns:105px minmax(0,1fr)!important;
}

/* Match the exact divider thickness used by each A row. */
body.seq19-day-active #resultCard .seq19-v3 .seq19-index{
  border-right:1px solid #555!important;
}

body.seq19-daytime-active #time130Card .seq19-v3 .seq19-index{
  border-right:2px solid #111!important;
}

/* Keep the rows compact; empty rows remain removed. */
.seq19-v3 .seq19-row[hidden]{
  display:none!important;
}

@media(max-width:520px){
  /* Preserve alignment even on phones instead of shrinking the number column. */
  body.seq19-day-active #resultCard .seq19-v3 .seq19-row{
    grid-template-columns:62px minmax(0,1fr)!important;
  }

  body.seq19-daytime-active #time130Card .seq19-v3 .seq19-row{
    grid-template-columns:105px minmax(0,1fr)!important;
  }
}
