/* Realtime availability table: weekday / weekend and public holiday rhythm. */
.mg-realtime-submain .mg-realtime-filter[hidden] {
  display: none !important;
}

.mg-realtime-submain .mg-realtime-sortbar {
  margin-top: 30px;
}

.mg-realtime-submain .mg-realtime-region-tabs a:nth-child(8) {
  background: #fff4ed;
}

.mg-realtime-submain .mg-realtime-region-tabs a:nth-child(8).is-active {
  background: #173f35;
}

.mg-realtime-submain .mg-availability-actions {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .mg-realtime-submain {
    overflow: visible;
  }

  .mg-realtime-submain .mg-availability-panel {
    overflow: visible;
  }

  .mg-realtime-submain .mg-availability-sticky-stack {
    position: sticky;
    top: 76px;
    z-index: 20;
    overflow: hidden;
    border-radius: 23px 23px 0 0;
    background: #fff;
    box-shadow: 0 12px 24px rgba(16, 49, 41, 0.08);
  }

  .mg-realtime-submain .mg-availability-sticky-dates {
    overflow: hidden;
    border-bottom: 1px solid #e7eee9;
    background: #f8fbf9;
  }

  .mg-realtime-submain .mg-availability-sticky-table {
    margin: 0;
  }

  .mg-realtime-submain .mg-availability-sticky-table thead th {
    position: static;
  }

  .mg-realtime-submain .mg-availability-sticky-table thead th.mg-course-col {
    position: sticky;
    left: 0;
    z-index: 4;
  }

  .mg-realtime-submain .has-sticky-availability-head [data-availability-table] > thead {
    visibility: collapse;
  }

  .mg-realtime-submain .has-sticky-availability-head [data-availability-table] > thead tr {
    height: 0;
  }

  .mg-realtime-submain .has-sticky-availability-head [data-availability-table] > thead th {
    height: 0;
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top: 0;
    border-bottom: 0;
    line-height: 0;
  }
}

.mg-realtime-submain .mg-availability-table-wrap {
  overflow-x: hidden;
}

.mg-realtime-submain .mg-availability-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.mg-realtime-submain .mg-availability-table .mg-course-col {
  width: clamp(175px, 19vw, 200px);
  min-width: 0;
  padding-left: 14px;
  padding-right: 10px;
}

.mg-realtime-submain .mg-availability-table .mg-calendar-col,
.mg-realtime-submain .mg-availability-table .mg-calendar-cell {
  width: 52px;
  min-width: 0;
  padding-right: 4px;
  padding-left: 4px;
}

.mg-realtime-submain .mg-availability-table .mg-date-column,
.mg-realtime-submain .mg-availability-table .mg-date-cell {
  display: table-cell;
  width: auto !important;
  min-width: 0 !important;
  padding-right: 2px;
  padding-left: 2px;
}

.mg-realtime-submain .mg-availability-table .mg-date-cell .mg-count {
  width: calc(100% - 6px);
  min-width: 28px;
  max-width: 41px;
}

.mg-realtime-submain .mg-club-info-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: #102f28;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mg-realtime-submain .mg-club-info-trigger span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.mg-realtime-submain .mg-club-info-trigger:hover span,
.mg-realtime-submain .mg-club-info-trigger:focus-visible span {
  color: #12634d;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mg-realtime-submain .mg-club-info-trigger:focus-visible {
  outline: 2px solid #8dbbab;
  outline-offset: 3px;
  border-radius: 4px;
}

body.mg-club-info-open {
  overflow: hidden;
}

.mg-club-info-modal[hidden] {
  display: none !important;
}

.mg-club-info-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.mg-club-info-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(13, 39, 32, 0.56);
  backdrop-filter: blur(4px);
  cursor: default;
}

.mg-club-info-dialog {
  position: relative;
  width: min(790px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid rgba(218, 230, 223, 0.95);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(4, 28, 21, 0.28);
  outline: none;
}

.mg-club-info-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e8efeb;
  background:
    radial-gradient(circle at 0 0, rgba(246, 111, 155, 0.1), transparent 230px),
    linear-gradient(135deg, #fff, #f5faf7);
}

.mg-club-info-dialog__header span {
  display: block;
  margin-bottom: 5px;
  color: #ae7120;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.mg-club-info-dialog__header h2 {
  margin: 0;
  color: #103129;
  font-size: 25px;
  line-height: 1.25;
}

.mg-club-info-dialog__close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #dce7e1;
  border-radius: 50%;
  background: #fff;
  color: #45645b;
  cursor: pointer;
}

.mg-club-info-dialog__close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.mg-club-info-dialog__body {
  max-height: calc(min(820px, 100vh - 48px) - 91px);
  padding: 20px 24px 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mg-club-info-loading,
.mg-club-info-error {
  display: grid;
  place-items: center;
  min-height: 280px;
  color: #5f726b;
  font-size: 14px;
  font-weight: 750;
  text-align: center;
}

.mg-club-info-error span {
  margin-top: -100px;
  color: #89958f;
  font-size: 12px;
  font-weight: 600;
}

.mg-club-info-summary {
  padding: 18px 20px;
  border: 1px solid #dce9e2;
  border-radius: 18px;
  background: linear-gradient(135deg, #f1f8f5, #fffaf4);
}

.mg-club-info-summary > span {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #e2f0ea;
  color: #21634f;
  font-size: 11px;
  font-weight: 850;
}

.mg-club-info-summary strong {
  display: block;
  margin-top: 9px;
  color: #0e3329;
  font-size: 21px;
}

.mg-club-info-summary p {
  margin: 8px 0 0;
  color: #64736d;
  font-size: 13px;
  line-height: 1.65;
}

.mg-club-info-section {
  margin-top: 20px;
}

.mg-club-info-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: #173f35;
  font-size: 15px;
}

.mg-club-info-section h3::before {
  content: "";
  width: 5px;
  height: 15px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ef6f98, #2268a8);
}

.mg-club-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  overflow: hidden;
  border: 1px solid #e0e9e4;
  border-radius: 15px;
  background: #fff;
}

.mg-club-info-grid > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  min-height: 54px;
  border-right: 1px solid #e8eeea;
  border-bottom: 1px solid #e8eeea;
}

.mg-club-info-grid > div:nth-child(2n),
.mg-club-info-grid > div.is-wide {
  border-right: 0;
}

.mg-club-info-grid > div.is-wide {
  grid-column: 1 / -1;
}

.mg-club-info-grid dt,
.mg-club-info-grid dd {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 10px 12px;
  line-height: 1.5;
}

.mg-club-info-grid dt {
  justify-content: center;
  background: #f6f9f7;
  color: #52665e;
  font-size: 12px;
  font-weight: 820;
  text-align: center;
}

.mg-club-info-grid dd {
  color: #203d35;
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.mg-club-info-grid dd a {
  color: #176b9e;
  font-weight: 800;
  text-decoration: none;
}

.mg-club-info-grid .is-empty {
  color: #9aa59f;
}

.mg-club-info-fees {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #e0e9e4;
  border-radius: 15px;
}

.mg-club-info-fees > div {
  min-height: 78px;
  padding: 13px 14px;
  border-right: 1px solid #e8eeea;
  border-bottom: 1px solid #e8eeea;
  background: #fff;
}

.mg-club-info-fees > div:nth-child(3n) {
  border-right: 0;
}

.mg-club-info-fees span,
.mg-club-info-fees strong {
  display: block;
}

.mg-club-info-fees span {
  color: #7a8882;
  font-size: 11px;
  font-weight: 750;
}

.mg-club-info-fees strong {
  margin-top: 7px;
  color: #153d32;
  font-size: 13px;
  line-height: 1.45;
}

.mg-club-info-note {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 11px;
  background: #f7f3eb;
  color: #87642d;
  font-size: 11px;
  line-height: 1.5;
}

.mg-club-info-grid--policy > div.is-wide dd {
  min-height: 65px;
  align-items: flex-start;
}

.mg-realtime-submain .mg-availability-table thead th.mg-date-column.is-weekday {
  background: linear-gradient(180deg, #f6faf8, #f0f7f3);
  color: #315c50;
  box-shadow: inset 0 -2px 0 rgba(42, 119, 94, 0.12);
}

.mg-realtime-submain .mg-availability-table thead th.mg-date-column.is-holiday {
  background: linear-gradient(180deg, #fffaf2, #fff3e3);
  color: #c7651a;
  box-shadow: inset 0 -2px 0 rgba(224, 132, 45, 0.16);
}

.mg-realtime-submain .mg-availability-table tbody td.mg-date-cell--weekday {
  background: linear-gradient(180deg, rgba(241, 248, 245, 0.58), rgba(255, 255, 255, 0.36));
}

.mg-realtime-submain .mg-availability-table tbody td.mg-date-cell--holiday {
  background: linear-gradient(180deg, rgba(255, 246, 232, 0.7), rgba(255, 252, 247, 0.45));
}

.mg-realtime-submain .mg-count.is-weekday:not(.is-empty) {
  border: 1px solid rgba(43, 126, 97, 0.1);
  background: linear-gradient(180deg, #eff8f4, #e4f2ec);
  color: #155843;
  box-shadow: 0 5px 12px rgba(31, 102, 78, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.mg-realtime-submain .mg-count.is-holiday:not(.is-empty) {
  border: 1px solid rgba(218, 123, 32, 0.13);
  background: linear-gradient(180deg, #fff5e6, #ffebd0);
  color: #c46216;
  box-shadow: 0 5px 12px rgba(199, 101, 26, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.mg-realtime-submain .mg-count.is-empty {
  border: 1px solid rgba(112, 125, 118, 0.06);
  background: linear-gradient(180deg, #f5f7f6, #edf1ef);
  color: #a6afaa;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.mg-realtime-submain .mg-calendar-button {
  border-color: #cfe0d8;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f3f8f5);
  color: #1c604d;
  box-shadow: 0 7px 16px rgba(27, 88, 70, 0.08);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.mg-realtime-submain .mg-calendar-button:hover {
  transform: translateY(-1px);
  border-color: #93b9aa;
  box-shadow: 0 10px 20px rgba(27, 88, 70, 0.13);
}

.mg-realtime-submain .mg-calendar-button .mg-calendar-icon {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 0;
}

.mg-realtime-submain .mg-calendar-button .mg-calendar-icon::before,
.mg-realtime-submain .mg-calendar-button .mg-calendar-icon::after {
  content: none;
}

.mg-realtime-submain .mg-calendar-icon svg {
  display: block;
  width: 24px;
  height: 24px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mg-realtime-submain .mg-calendar-icon .mg-calendar-icon__days {
  stroke-width: 2.2;
}

@media (max-width: 767px) {
  .mg-realtime-submain .mg-realtime-sortbar {
    margin-top: 14px;
  }

  .mg-realtime-submain .mg-availability-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .mg-realtime-submain .mg-availability-sticky-dates {
    display: none;
  }

  .mg-realtime-submain .mg-availability-table {
    min-width: 0;
  }

  .mg-realtime-submain .mg-availability-table .mg-course-col {
    width: auto;
    min-width: 0;
    padding-left: 0;
    padding-right: 58px;
  }

  .mg-club-info-modal {
    align-items: end;
    padding: 10px;
  }

  .mg-club-info-dialog {
    max-height: calc(100dvh - 20px);
    border-radius: 22px;
  }

  .mg-club-info-dialog__header {
    padding: 18px 18px 15px;
  }

  .mg-club-info-dialog__header h2 {
    font-size: 21px;
  }

  .mg-club-info-dialog__close {
    width: 40px;
    height: 40px;
  }

  .mg-club-info-dialog__body {
    max-height: calc(100dvh - 96px);
    padding: 16px 16px 22px;
  }

  .mg-club-info-summary {
    padding: 15px 16px;
  }

  .mg-club-info-grid,
  .mg-club-info-fees {
    grid-template-columns: 1fr;
  }

  .mg-club-info-grid > div,
  .mg-club-info-grid > div:nth-child(2n),
  .mg-club-info-fees > div,
  .mg-club-info-fees > div:nth-child(3n) {
    border-right: 0;
  }

  .mg-club-info-grid > div {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .mg-club-info-fees > div {
    min-height: 66px;
  }

  .mg-realtime-submain .mg-availability-table tbody td.mg-date-cell--weekday {
    border-color: rgba(43, 126, 97, 0.1);
    background: #f5faf7;
  }

  .mg-realtime-submain .mg-availability-table tbody td.mg-date-cell--holiday {
    border-color: rgba(218, 123, 32, 0.12);
    background: #fff8ee;
  }
}
