/* ============================================
   Мобільні стилі для таблиць
   Різні варіанти для різних таблиць
   ============================================ */

/* Загальні стилі для всіх таблиць */
.wp-block-table {
  margin: 20px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Montserrat", sans-serif;
}

/* ============================================
   ВАРІАНТ 1: Картковий стиль (Card-based)
   Для таблиці 1: Juegos de Casino
   ============================================ */
.wp-block-table:first-of-type table {
  border: none;
}

.wp-block-table:first-of-type thead {
  display: none;
}

.wp-block-table:first-of-type tbody tr {
  display: block;
  margin-bottom: 16px;
  background-color: #1b1d21;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #2a2e36;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.wp-block-table:first-of-type tbody td {
  display: block;
  padding: 8px 0;
  text-align: left;
  border: none;
  color: #e7eaee;
  font-size: 16px;
}

.wp-block-table:first-of-type tbody td:first-child {
  font-weight: 700;
  font-size: 18px;
  color: #ffcf05;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a2e36;
}

.wp-block-table:first-of-type tbody td:nth-child(2) {
  margin-bottom: 8px;
  line-height: 1.6;
}

.wp-block-table:first-of-type tbody td:last-child {
  font-size: 14px;
  color: #9c9fa5;
  font-style: italic;
}

.wp-block-table:first-of-type tbody td:before {
  content: attr(data-label);
  font-weight: 700;
  display: inline-block;
  min-width: 100px;
  color: #ffcf05;
  margin-right: 8px;
}

/* Десктоп: повертаємо стандартний вигляд */
@media (min-width: 768px) {
  .wp-block-table:first-of-type thead {
    display: table-header-group;
  }
  
  .wp-block-table:first-of-type tbody tr {
    display: table-row;
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    box-shadow: none;
  }
  
  .wp-block-table:first-of-type tbody td {
    display: table-cell;
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #2a2e36;
  }
  
  .wp-block-table:first-of-type tbody td:first-child {
    font-weight: normal;
    font-size: 16px;
    color: #e7eaee;
    margin-bottom: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #2a2e36;
  }
  
  .wp-block-table:first-of-type tbody td:before {
    display: none;
  }
}

/* ============================================
   ВАРІАНТ 2: Горизонтальний скрол з індикатором
   Для таблиці 2: Bonos y Promociones
   ============================================ */
.wp-block-table:nth-of-type(2) {
  position: relative;
}

.wp-block-table:nth-of-type(2)::after {
  content: "← Прокрутіть →";
  position: absolute;
  top: -30px;
  right: 0;
  font-size: 12px;
  color: #9c9fa5;
  font-family: "Montserrat", sans-serif;
}

@media (min-width: 768px) {
  .wp-block-table:nth-of-type(2)::after {
    display: none;
  }
}

.wp-block-table:nth-of-type(2) table {
  min-width: 600px;
}

.wp-block-table:nth-of-type(2) th,
.wp-block-table:nth-of-type(2) td {
  padding: 16px 12px;
  text-align: left;
  border-bottom: 1px solid #2a2e36;
  color: #e7eaee;
  white-space: nowrap;
}

.wp-block-table:nth-of-type(2) th {
  background-color: #2a2e36;
  color: #ffcf05;
  font-weight: 700;
  font-size: 16px;
  position: sticky;
  left: 0;
  z-index: 10;
}

.wp-block-table:nth-of-type(2) tbody tr:hover {
  background-color: #23262c;
}

/* ============================================
   ВАРІАНТ 3: Стиль списку з акордеоном
   Для таблиці 3: Top 10 bonos
   ============================================ */
.wp-block-table:nth-of-type(3) table {
  border: none;
}

.wp-block-table:nth-of-type(3) tbody tr {
  display: block;
  margin-bottom: 12px;
  background-color: #1b1d21;
  border-left: 4px solid #7113ff;
  border-radius: 8px;
  padding: 12px 16px;
  transition: all 0.3s ease;
}

.wp-block-table:nth-of-type(3) tbody tr:active {
  background-color: #23262c;
  transform: scale(0.98);
}

.wp-block-table:nth-of-type(3) tbody td {
  display: block;
  padding: 4px 0;
  border: none;
  color: #e7eaee;
  font-size: 16px;
}

.wp-block-table:nth-of-type(3) tbody td:first-child {
  font-weight: 700;
  font-size: 18px;
  color: #ffcf05;
  margin-bottom: 6px;
}

.wp-block-table:nth-of-type(3) tbody td:last-child {
  color: #9c9fa5;
  font-size: 14px;
}

@media (min-width: 768px) {
  .wp-block-table:nth-of-type(3) tbody tr {
    display: table-row;
    background-color: transparent;
    border-left: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
  }
  
  .wp-block-table:nth-of-type(3) tbody td {
    display: table-cell;
    padding: 16px;
    border-bottom: 1px solid #2a2e36;
  }
  
  .wp-block-table:nth-of-type(3) tbody td:first-child {
    font-weight: normal;
    font-size: 16px;
    color: #e7eaee;
    margin-bottom: 0;
  }
}

/* ============================================
   ВАРІАНТ 4: Вертикальні блоки з мітками
   Для таблиці 4: Proveedores de Software
   ============================================ */
.wp-block-table:nth-of-type(4) thead {
  display: none;
}

.wp-block-table:nth-of-type(4) tbody tr {
  display: block;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #1b1d21 0%, #23262c 100%);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #2a2e36;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.wp-block-table:nth-of-type(4) tbody td {
  display: block;
  padding: 10px 0;
  border: none;
  color: #e7eaee;
  font-size: 16px;
  position: relative;
  padding-left: 120px;
}

.wp-block-table:nth-of-type(4) tbody td:before {
  content: attr(data-label);
  position: absolute;
  left: 0;
  top: 10px;
  font-weight: 700;
  color: #ffcf05;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wp-block-table:nth-of-type(4) tbody td:first-child {
  font-size: 20px;
  font-weight: 700;
  color: #ffcf05;
  padding-left: 0;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid #2a2e36;
}

.wp-block-table:nth-of-type(4) tbody td:first-child:before {
  display: none;
}

@media (min-width: 768px) {
  .wp-block-table:nth-of-type(4) thead {
    display: table-header-group;
  }
  
  .wp-block-table:nth-of-type(4) tbody tr {
    display: table-row;
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    margin-bottom: 0;
  }
  
  .wp-block-table:nth-of-type(4) tbody td {
    display: table-cell;
    padding: 16px;
    padding-left: 16px;
    border-bottom: 1px solid #2a2e36;
  }
  
  .wp-block-table:nth-of-type(4) tbody td:before {
    display: none;
  }
  
  .wp-block-table:nth-of-type(4) tbody td:first-child {
    font-size: 16px;
    font-weight: normal;
    color: #e7eaee;
    margin-bottom: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #2a2e36;
  }
}

/* ============================================
   ВАРІАНТ 5: Компактний картковий стиль
   Для таблиці 5: Licencias Internacionales
   ============================================ */
.wp-block-table:nth-of-type(5) thead {
  display: none;
}

.wp-block-table:nth-of-type(5) tbody tr {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
  background-color: #1b1d21;
  border-radius: 12px;
  padding: 16px;
  border: 2px solid #2a2e36;
  transition: all 0.3s ease;
}

.wp-block-table:nth-of-type(5) tbody tr:active {
  border-color: #7113ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(113, 19, 255, 0.3);
}

.wp-block-table:nth-of-type(5) tbody td {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border: none;
  color: #e7eaee;
  font-size: 15px;
  border-bottom: 1px solid #2a2e36;
}

.wp-block-table:nth-of-type(5) tbody td:last-child {
  border-bottom: none;
}

.wp-block-table:nth-of-type(5) tbody td:before {
  content: attr(data-label);
  font-weight: 700;
  color: #ffcf05;
  margin-right: 12px;
  min-width: 80px;
}

@media (min-width: 768px) {
  .wp-block-table:nth-of-type(5) thead {
    display: table-header-group;
  }
  
  .wp-block-table:nth-of-type(5) tbody tr {
    display: table-row;
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    margin-bottom: 0;
  }
  
  .wp-block-table:nth-of-type(5) tbody td {
    display: table-cell;
    padding: 16px;
    border-bottom: 1px solid #2a2e36;
    justify-content: flex-start;
  }
  
  .wp-block-table:nth-of-type(5) tbody td:before {
    display: none;
  }
}

/* ============================================
   ВАРІАНТ 6: Горизонтальний скрол з фіксованою першою колонкою
   Для таблиці 6: Comparación de casinos (5 колонок)
   ============================================ */
.wp-block-table:nth-of-type(6) {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.wp-block-table:nth-of-type(6)::before {
  content: "Прокрутіть для перегляду всіх колонок →";
  position: absolute;
  top: -30px;
  left: 0;
  font-size: 12px;
  color: #9c9fa5;
  font-family: "Montserrat", sans-serif;
}

@media (min-width: 768px) {
  .wp-block-table:nth-of-type(6)::before {
    display: none;
  }
}

.wp-block-table:nth-of-type(6) table {
  min-width: 800px;
}

.wp-block-table:nth-of-type(6) th,
.wp-block-table:nth-of-type(6) td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid #2a2e36;
  color: #e7eaee;
  font-size: 14px;
  vertical-align: top;
}

.wp-block-table:nth-of-type(6) th {
  background-color: #2a2e36;
  color: #ffcf05;
  font-weight: 700;
  font-size: 15px;
  position: sticky;
  left: 0;
  z-index: 10;
  min-width: 120px;
}

.wp-block-table:nth-of-type(6) th:first-child {
  background-color: #2a2e36;
  z-index: 11;
}

.wp-block-table:nth-of-type(6) td:first-child {
  background-color: #1b1d21;
  position: sticky;
  left: 0;
  z-index: 9;
  font-weight: 700;
  color: #ffcf05;
}

.wp-block-table:nth-of-type(6) tbody tr:nth-child(even) {
  background-color: #23262c;
}

.wp-block-table:nth-of-type(6) tbody tr:nth-child(even) td:first-child {
  background-color: #23262c;
}

/* ============================================
   ВАРІАНТ 7: Стиль з іконками та акцентом
   Для таблиці 7: Métodos de Pago
   ============================================ */
.wp-block-table:nth-of-type(7) thead {
  display: none;
}

.wp-block-table:nth-of-type(7) tbody tr {
  display: block;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #1b1d21 0%, #2a2e36 100%);
  border-radius: 12px;
  padding: 18px;
  border-left: 5px solid #ffcf05;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.wp-block-table:nth-of-type(7) tbody tr:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.wp-block-table:nth-of-type(7) tbody td {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
  padding: 8px 0;
  border: none;
  color: #e7eaee;
  font-size: 15px;
  align-items: start;
}

.wp-block-table:nth-of-type(7) tbody td:first-child {
  grid-column: 1 / -1;
  font-size: 20px;
  font-weight: 700;
  color: #ffcf05;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid #2a2e36;
}

.wp-block-table:nth-of-type(7) tbody td:before {
  content: attr(data-label);
  font-weight: 700;
  color: #ffcf05;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wp-block-table:nth-of-type(7) tbody td:first-child:before {
  display: none;
}

@media (min-width: 768px) {
  .wp-block-table:nth-of-type(7) thead {
    display: table-header-group;
  }
  
  .wp-block-table:nth-of-type(7) tbody tr {
    display: table-row;
    background: transparent;
    border-radius: 0;
    padding: 0;
    border-left: none;
    box-shadow: none;
    margin-bottom: 0;
  }
  
  .wp-block-table:nth-of-type(7) tbody td {
    display: table-cell;
    padding: 16px;
    border-bottom: 1px solid #2a2e36;
    grid-template-columns: none;
  }
  
  .wp-block-table:nth-of-type(7) tbody td:before {
    display: none;
  }
  
  .wp-block-table:nth-of-type(7) tbody td:first-child {
    font-size: 16px;
    font-weight: normal;
    color: #e7eaee;
    margin-bottom: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #2a2e36;
  }
}

/* ============================================
   Загальні стилі для заголовків таблиць
   ============================================ */
.wp-block-table th {
  background-color: #2a2e36;
  color: #ffcf05;
  font-weight: 700;
  text-align: left;
  padding: 16px;
  font-size: 16px;
  border-bottom: 2px solid #7113ff;
}

/* Десктоп стилі для всіх таблиць */
@media (min-width: 768px) {
  .wp-block-table table {
    border: 1px solid #2a2e36;
    border-radius: 8px;
    overflow: hidden;
  }
  
  .wp-block-table th,
  .wp-block-table td {
    padding: 16px;
    border-bottom: 1px solid #2a2e36;
  }
  
  .wp-block-table tbody tr:hover {
    background-color: #23262c;
  }
  
  .wp-block-table tbody tr:last-child td {
    border-bottom: none;
  }
}

/* Додаткові утиліти */
.wp-block-table::-webkit-scrollbar {
  height: 8px;
}

.wp-block-table::-webkit-scrollbar-track {
  background: #1b1d21;
  border-radius: 4px;
}

.wp-block-table::-webkit-scrollbar-thumb {
  background: #7113ff;
  border-radius: 4px;
}

.wp-block-table::-webkit-scrollbar-thumb:hover {
  background: #a80eff;
}

