/* =======================================================================
   StatsBet – Predictions Today Table Styles (Overrides Avada Defaults)
======================================================================= */

/* General Container */
.statsbet-predictions-table {
  padding: 0 !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  font-family: 'Segoe UI', sans-serif !important;
}

/* Title Styling */
.statsbet-title {
  text-align: center !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  color: #004aad !important;
  margin-bottom: 24px !important;
  letter-spacing: -0.3px !important;
}

/* Table Styling */
.statsbet-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background-color: transparent !important;
  table-layout: auto !important;
}

.statsbet-table thead {
  background-color: #004aad !important;
  color: #ffffff !important;
}

.statsbet-table thead tr:hover {
  background-color: #004aad !important;
}

/* 🔥 Align all cells vertically center (desktop) */
.statsbet-table th, .statsbet-table td {
  padding: 16px 20px !important;
  text-align: left !important;
  vertical-align: middle !important; /* Center vertically */
  white-space: nowrap !important;
  border-bottom: 1px solid #e3e3e3 !important;
}

/* Sticky First Column */
.statsbet-table th:first-child,
.statsbet-table td:first-child {
  position: sticky !important;
  left: 0 !important;
  min-width: 160px !important;
  z-index: 2;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05) !important;
}

.statsbet-table th:first-child {
  background-color: #004aad !important;
  color: #ffffff !important;
  border-top-left-radius: 10px !important;
  z-index: 3;
}

.statsbet-table td:first-child {
  background-color: #f9f9fb !important;
}

.statsbet-table th:last-child {
  border-top-right-radius: 10px !important;
}

.statsbet-table tr:last-child td {
  border-bottom: none !important;
}

.statsbet-table tbody tr {
  background-color: #f9f9fb !important;
}

.statsbet-table tbody tr:hover {
  background-color: #eaf3ff !important;
}

.statsbet-table tbody tr:hover td:first-child {
  background-color: #eaf3ff !important;
}

/* Lists and Text Styling */
.statsbet-table ul {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0 !important;
}

.statsbet-table li {
  margin-bottom: 6px !important;
  padding: 4px 6px !important;
  background: rgba(255, 204, 0, 0.3) !important; /* Highlight background */
  color: #002f5f !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  border-top: 2px solid #f2f3f5 !important;
  border-right: 2px solid #f2f3f5 !important;
  border-bottom: 2px solid #f2f3f5 !important;
  border-left: 4px solid #ffcc00 !important; /* Left highlight border */
  border-radius: 4px !important; /* Rounded corners preserved */
  box-sizing: border-box !important;
}

.statsbet-table ul li:last-child {
  margin-bottom: 0 !important;
}

.statsbet-table small {
  font-size: 12px !important;
  color: #666 !important;
  display: inline-block;
  margin-top: 4px !important;
}

.statsbet-table td strong {
  color: #004aad !important;
}

/* Center "Spiltips" Header Text Vertically */
.statsbet-table th:nth-child(5) {
  vertical-align: middle !important;
  padding-top: 16px !important;
  padding-bottom: 16px !important;
  line-height: 1.2 !important;
  text-align: center !important;
}

/* Responsive: Mobile & Tablet */
@media (max-width: 1024px) {
  .statsbet-table {
    display: block !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .statsbet-table thead {
    display: none !important;
  }

  .statsbet-table tbody {
    display: block !important;
  }

  .statsbet-table tbody tr {
    display: block !important;
    margin-bottom: 20px !important;
    padding: 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    background-color: #f9f9fb !important;
  }

  .statsbet-table td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #eee !important;
    flex-wrap: wrap !important;
    word-break: break-word !important;
  }

  .statsbet-table td::before {
    content: attr(data-label);
    font-weight: 600 !important;
    color: #004aad !important;
    flex: 0 0 45%;
    padding-right: 10px;
    text-align: left !important;
  }

  /* 🔥 Enhanced Header Styling for Mobile/Tablet */
  .statsbet-table td[data-label="Kamp"] {
    display: block !important;
    text-align: center !important;
    font-weight: bold !important;
    font-size: 16px !important;
    border: none !important;
    padding: 12px !important;
    background: linear-gradient(135deg, #004aad 0%, #007bff 100%) !important; /* Gradient */
    color: #ffffff !important;
    border-radius: 10px !important; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 10px !important;
  }

  .statsbet-table td[data-label="Kamp"] strong,
  .statsbet-table td[data-label="Kamp"] small {
    color: #ffffff !important;
  }

  .statsbet-table td[data-label="Kamp"]::before {
    display: none !important;
  }

  .statsbet-table td:last-child {
    border-bottom: none !important;
  }
}
