/* ==========================================================
   LotteryCheckerPro – Draw History Page (CLEAN)
   ========================================================== */

/* --------------------------
   Filter form
--------------------------- */
.lcpro-history-filter {
  margin-bottom: 20px;
}

.lcpro-filter-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Dropdowns + button (desktop) */
.lcpro-filter-row select,
.lcpro-filter-row button {
  padding: 10px;
  font-size: 16px; /* prevent iOS zoom */
  max-width: 260px;
  width: auto;
}

/* Mobile filter layout */
@media (max-width: 600px) {
  .lcpro-filter-row {
    flex-direction: column;
    align-items: center;
  }

  .lcpro-filter-row select,
  .lcpro-filter-row button {
    width: 100%;
    max-width: 260px;
  }
}

/* --------------------------
   CSV download button
--------------------------- */
.lcpro-csv-form {
  display: flex;
  justify-content: center;
  margin: 15px 0;
}

/* --------------------------
   Table wrapper (ONLY scroll container)
--------------------------- */
.lcpro-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --------------------------
   History table (CRITICAL FIXES)
--------------------------- */
.lcpro-history-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;

  /* ?? THESE TWO LINES FIX EVERYTHING */
  table-layout: fixed;
}

/* Base cell styling */
.lcpro-history-table th,
.lcpro-history-table td {
  padding: 6px;
  text-align: center;
  border: 1px solid #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sticky header */
.lcpro-history-table th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

/* --------------------------
   Column sizing (DESKTOP)
--------------------------- */

/* Date column */
.lcpro-history-table th:first-child,
.lcpro-history-table td:first-child {
  width: 90px;
}

/* All number columns */
.lcpro-history-table th:not(:first-child),
.lcpro-history-table td:not(:first-child) {
  width: 48px;
}

/* --------------------------
   Mobile table optimisation
--------------------------- */
@media (max-width: 600px) {

  .lcpro-history-table th,
  .lcpro-history-table td {
    padding: 3px;
    font-size: 11px;
  }

  /* Narrower date */
  .lcpro-history-table th:first-child,
  .lcpro-history-table td:first-child {
    width: 70px;
    font-size: 10px;
  }

  /* Much narrower number columns */
  .lcpro-history-table th:not(:first-child),
  .lcpro-history-table td:not(:first-child) {
    width: 30px;
  }
}
