.lottery-viewer {
  font-family: "Roboto", sans-serif;
  width: 100%;
  margin: 0 auto !important;
  padding: 25px;
  background-color: #ffffff;
  border-radius: 12px;
  flex-direction: column;
}

.lottery-loading {
  color: #f14646;
  align-items: center;
  text-align: center;
}

#lottery-result,
#lottery-result * {
  display: revert !important; /* giữ lại display đúng */
  box-sizing: border-box !important;
}

/* RESET TABLE */
#lottery-result table {
  border-collapse: collapse !important;
  width: 100% !important;
  margin-bottom: 20px !important;
  font-family: Arial, sans-serif !important;
  font-size: 15px !important;
  color: #222 !important;
}

/* RESET TH, TD */
#lottery-result th {
  background-color: #f7543b;
  color: #fff;
  font-size: 15px !important;
  font-weight: 400;
  align-items: center;
  text-align: center;
}

#lottery-result td {
  padding: 6px 4px !important;
  border: 1px solid #dcdcdc !important;
  text-align: center !important;
  padding-left: 10px !important;
}

/* RESET HEADERS */
#lottery-result h2,
#lottery-result p {
  margin: 5px 0 !important;
  padding: 5px 0 !important;
  font-size: 18px !important;
  text-align: center !important;
  font-weight: bold !important;
}

.tr-black td {
  color: #cf2e2e;
  font-size: 15px;
  font-weight: 600;
}

/* RESET TABLE WRAPPERS */
#lottery-result .table-responsive {
  width: 100% !important;
  overflow-x: auto !important;
}

/* RESET COLORS */
#lottery-result .text-red {
  color: #d40000 !important;
  font-weight: bold !important;
}

#lottery-result .text-bold {
  font-weight: bold !important;
}

#lottery-result p.error-message {
  color: #d32f2f;
  font-weight: bold;
}

/* --- UNIFORM INPUT HEIGHT --- */
#lottery-controls .lotto-select,
#lottery-controls input[type="date"].lotto-select,
#lottery-controls .lotto-btn {
  height: 48px !important;
  font-size: 16px;
  padding: 0 14px !important;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-sizing: border-box;
}

/* --- FLEX ROW DESKTOP: GIÃN ĐỀU --- */
#lottery-controls.controls-row {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
}

#lottery-controls .lotto-select,
#lottery-controls input[type="date"].lotto-select {
  flex: 1;
  max-width: none !important;
}

#lottery-controls .lotto-btn {
  flex: 0 0 150px;
  background: #f7543b;
  color: #fff;
  border: none;
  cursor: pointer;
}
#lottery-controls .lotto-btn:hover {
  background: #f14646;
}

/* --- MOBILE: XUỐNG DÒNG TỪNG Ô --- */
@media (max-width: 768px) {
  #lottery-controls.controls-row {
    flex-direction: column;
    gap: 10px;
  }

  #lottery-controls .lotto-select,
  #lottery-controls input[type="date"].lotto-select,
  #lottery-controls .lotto-btn {
    width: 100%;
    flex: none;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .lottery-viewer {
    margin: 20px 15px;
    padding: 15px;
  }

  #lottery-viewer select,
  #lottery-viewer input[type="date"],
  #lottery-viewer button {
    font-size: 14px;
    padding: 10px 12px;
  }

  #lottery-result {
    font-size: 1em;
    padding: 10px;
  }
}
