
/* --- Default Table --- */
.responsive-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  font-size: 14px;
}

.responsive-table th,
.responsive-table td {
  border: 1px solid #ddd;
  padding: 12px 10px;
}

.responsive-table th {
  background-color: #f4f6f9;
  font-weight: bold;
  text-align: center;
}

.responsive-table td:first-child {
  text-align: left;
  font-weight: bold;
  background-color: #f9f9f9;
}

.responsive-table tbody tr:nth-child(odd) {
  background-color: #ffffff;
}
.responsive-table tbody tr:nth-child(even) {
  background-color: #f7faff;
}

/* --- Mobile Responsive Fix --- */
@media screen and (max-width: 768px) {
  .responsive-table thead {
    display: none;
  }
  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }
  .responsive-table tr {
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
  }

  /* ✅ First column becomes full-width header */
  .responsive-table td:first-child {
    background: #f4f6f9;
    font-weight: bold;
    text-align: center;
    padding: 12px;
    border-bottom: 2px solid #ccc;
  }

  /* ✅ Other cells stack with labels */
  .responsive-table td:not(:first-child) {
    text-align: left;
    padding: 10px 10px 10px 120px;
    position: relative;
    border: none;
    border-bottom: 1px solid #eee;
    white-space: normal;
    word-wrap: break-word;
  }
  .responsive-table td:not(:first-child):last-child {
    border-bottom: none;
  }

  /* ✅ Labels appear only on non-first cells */
  .responsive-table td:not(:first-child)::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    top: 10px;
    width: 100px;
    font-weight: bold;
    color: #333;
    white-space: normal;
  }
}
