/* -------------- Table base -------------- */
.fs-lessons-table {
  width: 100%;
  border-collapse: collapse;
}
.fs-lessons-table th,
.fs-lessons-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
  text-align: left;
  word-break: break-word;
}
.fs-lessons-table thead th {
  font-weight: 600;
  color: #0f172a;
}
.toggle-heading {
  margin: 28px 0 10px;
  font-size: 1.4rem;
  font-weight: 700;
}

/* -------------- Mobile: “cards” -------------- */
@media (max-width: 768px) {
  .fs-lessons-table thead { display: none; }

  .fs-lessons-table,
  .fs-lessons-table tbody,
  .fs-lessons-table tr,
  .fs-lessons-table td {
    display: block;
    width: 100%;
  }

  .fs-lessons-table tbody tr {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin: 16px 0;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
  }

  .fs-lessons-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
  }

  /* Label on the left */
  .fs-lessons-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6b7280;
    margin-right: 16px;
    flex: 0 0 auto;
  }

  /* coloured “Day” header bar per card */
  .fs-lessons-table tbody tr > td:first-child {
    background: #eef2ff;         /* indigo-50 */
    color: #111827;
    font-weight: 700;
    border-bottom: 1px solid #e5e7eb;
  }

  /* keep actions tidy */
  .fs-lessons-table td[data-label="Dates"],
  .fs-lessons-table td[data-label="Book"] {
    justify-content: flex-start;
    gap: 10px;
  }
}

/* -------------- Dates Modal -------------- */
#fsDatesOverlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .6);
  display: none;
  z-index: 999999; /* above admin bar/customizer */
}
#fsDatesOverlay.is-open { display: block; }
.fs-modal-open { overflow: hidden; }

/* Centered on all screens */
#fsDatesOverlay .fs-modal {
  position: fixed;
  top: 10vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, 92vw);
  max-height: 80vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.fs-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
}
.fs-modal__header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}
.fs-modal__close {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.fs-modal__body {
  padding: 12px 14px;
  overflow: auto;
}

/* Dates table inside modal */
.fs-dates-table {
  width: 100%;
  border-collapse: collapse;
}
.fs-dates-table th,
.fs-dates-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e9ecef;
  text-align: left;
}
.fs-dates-table tr.is-closed td {
  color: #b91c1c;
  font-style: italic;
}
.fs-dates-btn {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
}