/* Mealplanet Comparison Table Widget */

.mealplanet-comparison-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.mealplanet-comparison-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  background: transparent;
  overflow: hidden;
}

.mealplanet-comparison-table th,
.mealplanet-comparison-table td {
  padding: 0 0 16px 0;
  border: none;
  text-align: center;
  vertical-align: middle;
}

.mealplanet-comparison-table tbody tr:last-child td,
.mealplanet-comparison-table tbody tr:last-child th {
  padding: 0;
}

.mealplanet-comparison-table th {
  font-weight: 600;
  font-size: 1rem;
  background: transparent;
}

.mealplanet-comparison-table thead:first-child tr:first-child th {
  border-block-start-color: transparent;
}

.mealplanet-comparison-table .mp-col-label {
  text-align: left;
  font-weight: 500;
}

.mealplanet-comparison-table td:first-child,
.mealplanet-comparison-table th:first-child {
  min-width: 140px;
}

.mealplanet-comparison-table th:first-child {
  background: transparent;
}

.mealplanet-comparison-table .mp-cell {
  text-align: center;
}

.mealplanet-comparison-table .mp-cell-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mealplanet-comparison-table tbody > tr:nth-child(odd) > td,
.mealplanet-comparison-table tbody > tr:nth-child(odd) > th {
  background-color: transparent;
}

.mealplanet-comparison-table tbody tr:hover,
.mealplanet-comparison-table tbody tr:hover td,
.mealplanet-comparison-table td:hover,
.mealplanet-comparison-table th:hover {
  background: transparent !important;
}

/* Responsive */
@media (max-width: 767px) {
  /* Remove horizontal scroll and switch to stacked "card" layout */
  .mealplanet-comparison-table-wrapper {
    overflow-x: visible;
  }

  .mealplanet-comparison-table {
    border-collapse: separate;
  }

  .mealplanet-comparison-table thead {
    display: none;
  }

  .mealplanet-comparison-table,
  .mealplanet-comparison-table tbody,
  .mealplanet-comparison-table tr {
    display: block;
    width: 100%;
  }

  .mealplanet-comparison-table tbody tr {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 0px rgba(0, 0, 0, 0.12);
    padding: 16px 18px 14px;
    margin-bottom: 16px;
  }

  .mealplanet-comparison-table th,
  .mealplanet-comparison-table td {
    display: block;
    width: 100%;
    padding: 4px 0;
    font-size: 0.9rem;
    text-align: left;
  }

  .mealplanet-comparison-table tbody tr:last-child td {
    padding: 4px 0;
  }

  /* Feature label at top of each card */
  .mealplanet-comparison-table .mp-col-label {
    font-weight: 600;
    margin-bottom: 10px;
  }

  /* Each cell becomes a row: "Column Name  icon" */
  .mealplanet-comparison-table .mp-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .mealplanet-comparison-table .mp-cell::before {
    content: attr(data-column);
    font-weight: 500;
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.7);
  }

  .mealplanet-comparison-table .mp-cell-icon {
    width: 20px;
    height: 20px;
  }
}
