.cb-wrap {
  max-width: 980px;
}

/* ========================================
   GENERIC UI
   ======================================== */

.cb-balance {
  padding: 10px 12px;
  background: #f6f7f7;
  border: 1px solid #e2e4e7;
  border-radius: 8px;
  margin: 12px 0;
}

.cb-muted {
  color: #6f879f;
}

.cb-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 24px;
}

.cb-table th,
.cb-table td {
  border-bottom: 1px solid #eee;
  padding: 10px 8px;
  text-align: left;
}

.cb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 0;
  border-radius: 12px;
  background: #2271b1;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.cb-btn:hover {
  opacity: 0.92;
}

.cb-btn-secondary {
  background: #6c757d;
}

.cb-notice {
  padding: 10px 12px;
  border-radius: 8px;
  margin: 10px 0;
}

.cb-ok {
  background: #e9f7ef;
  border: 1px solid #b7e4c7;
}

.cb-error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
}

.cb-empty {
  padding: 14px 16px;
  border: 1px dashed #c9d9e8;
  border-radius: 16px;
  background: #f8fbff;
  color: #6f879f;
}

/* ========================================
   CALENDAR SHELL
   ======================================== */

.cb-cal-wrap {
  max-width: 980px;
  margin: 24px auto;
  padding: 0 16px;
}

.cb-cal-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe7f3;
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(16, 42, 67, 0.1);
  overflow: hidden;
}

.cb-cal {
  max-width: 100%;
  margin: 0;
}

.cb-cal__topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 22px 0;
  flex-wrap: wrap;
}

.cb-cal__eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5f7a96;
}

.cb-cal__balance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #edf6ff;
  border: 1px solid #cfe3ff;
  border-radius: 999px;
  font-size: 13px;
  color: #184c7c;
}

.cb-cal__head {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
}

.cb-cal__title {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  color: #16324f;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.cb-cal__nav {
  width: 52px;
  height: 52px;
  border: 1px solid #d4e2ef;
  border-radius: 16px;
  background: #fff;
  color: #184c7c;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: 0.18s ease;
  box-shadow: 0 6px 18px rgba(16, 42, 67, 0.06);
}

.cb-cal__nav:hover {
  transform: translateY(-1px);
  border-color: #a9c7e8;
  background: #f5faff;
}

/* ========================================
   CALENDAR GRID
   ======================================== */

.cb-cal__weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  padding: 0 22px 10px;
  box-sizing: border-box;
}

.cb-cal__weekdays > div {
  display: block;
  width: auto;
  min-width: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #7690aa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cb-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  align-items: stretch;
  padding: 0 22px 18px;
  box-sizing: border-box;
}

.cb-cal__cell,
.cb-cal__grid button,
.cb-cal__grid .cb-cal__cell,
.cb-day,
.cb-cal__daybtn {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 78px;
  padding: 12px 10px;
  border-radius: 18px;
  border: 1px solid #dce7f2;
  background: #fff;
  color: #16324f;
  cursor: pointer;
  text-align: left;
  font: inherit;
  box-sizing: border-box;
  box-shadow: 0 8px 20px rgba(16, 42, 67, 0.05);
  transition: 0.18s ease;
  overflow: hidden;
}

.cb-cal__grid button:hover,
.cb-cal__grid .cb-day:hover,
.cb-cal__grid .cb-cal__cell:hover {
  transform: translateY(-2px);
  border-color: #a9c7e8;
  box-shadow: 0 12px 28px rgba(16, 42, 67, 0.1);
}

.cb-cal__grid .cb-empty-day,
.cb-cal__grid .is-empty {
  background: #f7fafc;
  border-style: dashed;
  box-shadow: none;
  cursor: default;
  opacity: 0.7;
}

.cb-cal__grid > .cb-empty-day {
  width: 100%;
  min-height: 78px;
}

.cb-cal__grid .cb-past,
.cb-cal__grid .is-past {
  opacity: 0.45;
  pointer-events: none;
}

.cb-cal__grid .cb-has-free,
.cb-cal__grid .is-available {
  background: linear-gradient(180deg, #ffffff 0%, #f1f8ff 100%);
  border-color: #b9d8ff;
}

.cb-cal__grid .cb-selected,
.cb-cal__grid .active,
.cb-cal__grid .is-selected {
  background: linear-gradient(180deg, #2f80ed 0%, #1f6fd9 100%);
  color: #ffffff;
  border-color: #1f6fd9;
  box-shadow: 0 14px 32px rgba(47, 128, 237, 0.32);
}

.cb-cal__grid .cb-has-free.cb-selected,
.cb-cal__grid .cb-has-free.active,
.cb-cal__grid .cb-has-free.is-selected,
.cb-cal__grid .is-available.cb-selected,
.cb-cal__grid .is-available.active,
.cb-cal__grid .is-available.is-selected {
  background: linear-gradient(180deg, #2f80ed 0%, #1f6fd9 100%);
  color: #ffffff;
  border-color: #1f6fd9;
  box-shadow: 0 14px 32px rgba(47, 128, 237, 0.32);
}

.cb-cal__grid .cb-today,
.cb-cal__grid .is-today {
  box-shadow: 0 0 0 1px rgba(47,128,237,0.55);
}

.cb-cal__grid .cb-today::after,
.cb-cal__grid .is-today::after {
  content: "";
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
}

.cb-cal__num {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: inherit;
}

.cb-cal__badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  background: #2271b1;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 999px;
  line-height: 1.2;
}

.cb-cal__grid .cb-selected .cb-cal__num,
.cb-cal__grid .active .cb-cal__num,
.cb-cal__grid .is-selected .cb-cal__num,
.cb-cal__grid .cb-has-free.cb-selected .cb-cal__num,
.cb-cal__grid .cb-has-free.active .cb-cal__num,
.cb-cal__grid .cb-has-free.is-selected .cb-cal__num,
.cb-cal__grid .is-available.cb-selected .cb-cal__num,
.cb-cal__grid .is-available.active .cb-cal__num,
.cb-cal__grid .is-available.is-selected .cb-cal__num {
  color: #ffffff;
  opacity: 1;
  visibility: visible;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

.cb-cal__grid .cb-selected .cb-cal__badge,
.cb-cal__grid .active .cb-cal__badge,
.cb-cal__grid .is-selected .cb-cal__badge,
.cb-cal__grid .cb-has-free.cb-selected .cb-cal__badge,
.cb-cal__grid .cb-has-free.active .cb-cal__badge,
.cb-cal__grid .cb-has-free.is-selected .cb-cal__badge,
.cb-cal__grid .is-available.cb-selected .cb-cal__badge,
.cb-cal__grid .is-available.active .cb-cal__badge,
.cb-cal__grid .is-available.is-selected .cb-cal__badge {
  background: #ffffff;
  color: #1f6fd9;
  border: 0;
}

/* ========================================
   CALENDAR LEGEND
   ======================================== */

.cb-cal__legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 0 22px 20px;
  color: #5f7a96;
  font-size: 13px;
}

.cb-cal__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cb-cal__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.cb-cal__dot--free {
  background: #6bb6ff;
}

.cb-cal__dot--selected {
  background: #2f80ed;
}

/* ========================================
   SELECTED DAY / SLOT LIST
   ======================================== */

.cb-cal__day {
  margin: 0 18px 18px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #dbe7f3;
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.cb-cal__dayhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cb-cal__daytitle {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #16324f;
  letter-spacing: -0.02em;
}

.cb-cal__list,
.cb-cal__slots {
  display: grid;
  gap: 12px;
  min-width: 0;
  box-sizing: border-box;
}

/* ========================================
   SLOT CARDS
   ======================================== */

.cb-slot {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(110px, 160px) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  width: 100%;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dbe7f3;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  box-sizing: border-box;
  transition: 0.18s ease;
}

.cb-slot:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(16, 42, 67, 0.08);
}

.cb-slot > :first-child {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.cb-slot__main {
  min-width: 0;
  box-sizing: border-box;
}

.cb-slot__trainer,
.cb-cal__slottrainer {
  font-size: 16px;
  font-weight: 800;
  color: #16324f;
  margin-bottom: 4px;
}

.cb-slot__meta {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
  color: #6f879f;
  white-space: nowrap;
}

.cb-slot__time,
.cb-cal__slottime {
  font-size: 17px;
  font-weight: 800;
  color: #184c7c;
  white-space: nowrap;
  text-align: center;
}

.cb-slot__right,
.cb-slot > :last-child {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: end;
  align-content: center;
  gap: 10px;
  min-width: 0;
  box-sizing: border-box;
}

.cb-slot__price {
  font-size: 16px;
  font-weight: 800;
  color: #16324f;
  white-space: nowrap;
}

.cb-cal__slotactions {
  display: grid;
  justify-items: end;
  gap: 8px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.cb-cal__slotactions .cb-btn,
.cb-cal__slotactions form,
.cb-cal__slotactions a {
  justify-self: end;
  max-width: 100%;
}

.cb-cal__slotactions .cb-muted {
  display: block;
  margin-left: 0;
  text-align: right;
  max-width: 280px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.cb-cal__avatar {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  background: #f0f0f1;
}

.cb-cal__avatar--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #1d2327;
}

/* ========================================
   BALANCE PILLS
   ======================================== */

.cb-balance-nav-item {
  display: flex;
  align-items: center;
}

.cb-balance-pill--header {
  margin-right: 6px;
}

#cb-balance-pill-header {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 9999 !important;
}

.cb-balance.cb-balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  padding: 6px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.cb-balance.cb-balance-pill strong {
  font-weight: 800;
}

/* ========================================
   MY UPCOMING BOOKINGS
   ======================================== */

/* ========================================
   MY UPCOMING BOOKINGS
   ======================================== */

.cb-my-bookings {
  margin: 22px 0 28px;
}

.cb-my-bookings__title {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0b0833;
}

.cb-my-bookings__content {
  background: #f7fcf9;
  border: 1px solid #d9eee2;
  border-radius: 20px;
  padding: 4px 0;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.05);
}

.cb-my-bookings .cb-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse !important;
}

.cb-my-bookings .cb-table thead th {
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #667085;
  border-bottom: 1px solid #edf1f5;
  background: transparent;
}

.cb-my-bookings .cb-table tbody td {
  padding: 16px 18px;
  font-size: 17px;
  color: #101828;
  border-bottom: 1px solid #eef3f0;
  vertical-align: middle;
  background: transparent;
}

.cb-my-bookings .cb-table tbody tr:last-child td {
  border-bottom: 0;
}

.cb-my-bookings .cb-table tbody tr:hover td {
  background: #ecf8f1;
}

.cb-my-bookings .cb-table tbody td:first-child {
  font-weight: 800;
  color: #0b0833;
}

.cb-my-bookings .cb-table tbody td:nth-child(3) {
  font-weight: 600;
  font-family: monospace;
  color: #5f6b73;
}

.cb-my-bookings .cb-table tbody td:nth-child(4) {
  font-weight: 800;
  color: #166534;
  white-space: nowrap;
}

.cb-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.cb-my-bookings .cb-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid #f2b8bf;
  border-radius: 12px;
  background: #fff5f6;
  color: #b42318;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: all 0.15s ease;
}

.cb-my-bookings .cb-btn-secondary:hover {
  background: #ffe8ea;
  border-color: #e89aa4;
}

/* ========================================
   MY BOOKINGS MOBILE
   ======================================== */

@media (max-width: 767px) {
  .cb-my-bookings {
    margin: 20px 0 24px;
  }

  .cb-my-bookings__title {
    margin-bottom: 10px;
    font-size: 30px;
    line-height: 1.04;
  }

  .cb-my-bookings__content {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .cb-my-bookings .cb-table,
  .cb-my-bookings .cb-table thead,
  .cb-my-bookings .cb-table tbody,
  .cb-my-bookings .cb-table tr,
  .cb-my-bookings .cb-table th,
  .cb-my-bookings .cb-table td {
    display: block;
    width: 100%;
  }

  .cb-my-bookings .cb-table {
    margin: 0;
  }

  .cb-my-bookings .cb-table thead {
    display: none;
  }

  .cb-my-bookings .cb-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .cb-my-bookings .cb-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    column-gap: 12px;
    row-gap: 8px;
    align-items: start;
    padding: 12px 14px;
    border: 1px solid #d9eee2;
    border-radius: 18px;
    background: #f7fcf9;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.04);
  }

  .cb-my-bookings .cb-table tbody td {
    width: auto;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent !important;
    font-size: 15px;
    line-height: 1.35;
  }

  .cb-my-bookings .cb-table tbody tr:hover td {
    background: transparent !important;
  }

  /* left column */
  .cb-my-bookings .cb-table tbody td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
    color: #0b0833;
    margin-bottom: 1px;
  }

  .cb-my-bookings .cb-table tbody td:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    font-size: 15px;
    color: #101828;
  }

  .cb-my-bookings .cb-table tbody td:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
    font-size: 15px;
    font-family: monospace;
    font-weight: 600;
    color: #5f6b73;
  }

  /* right column */
  .cb-my-bookings .cb-table tbody td:nth-child(4) {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    font-size: 15px;
    font-weight: 800;
    color: #166534;
    line-height: 1.2;
    white-space: nowrap;
  }

  .cb-my-bookings .cb-table tbody td:nth-child(5) {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: start;
    margin: 0;
  }

  .cb-my-bookings .cb-table tbody td:nth-child(5) form,
  .cb-my-bookings .cb-actions,
  .cb-my-bookings__actions {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    margin: 0;
  }

  .cb-my-bookings .cb-btn-secondary {
    min-height: 34px;
    padding: 7px 13px;
    border-radius: 12px;
    font-size: 14px;
  }
}
/* ========================================
   TERMS MODAL
   ======================================== */

.cb-terms {
  margin-top: 14px;
}

.cb-terms a {
  color: #2d5bff;
  text-decoration: underline;
}

.cb-terms-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

.cb-terms-box {
  background: #fff;
  width: min(680px, 100%);
  margin: 24px auto;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  position: relative;
}

.cb-terms-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 3;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.cb-terms-header h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  padding-right: 8px;
}

.cb-terms-close {
  border: 0;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  padding: 0;
  flex: 0 0 auto;
}

.cb-terms-content {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.cb-terms-content h3 {
  margin: 18px 0 8px;
  font-size: 18px;
}

.cb-terms-content p {
  margin: 0 0 12px;
  line-height: 1.6;
}

body.cb-terms-open {
  overflow: hidden;
}

.woocommerce-privacy-policy-text {
  display: none !important;
}

/* ========================================
   TABLET / NARROW DESKTOP
   ======================================== */

@media (max-width: 1100px) {
  .cb-slot {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .cb-slot__meta {
    white-space: normal;
  }

  .cb-slot__time,
  .cb-cal__slottime {
    text-align: left;
  }

  .cb-slot__right,
  .cb-slot > :last-child,
  .cb-cal__slotactions {
    justify-items: start;
  }

  .cb-cal__slotactions .cb-btn,
  .cb-cal__slotactions form,
  .cb-cal__slotactions a {
    justify-self: start;
  }

  .cb-cal__slotactions .cb-muted {
    text-align: left;
    max-width: none;
  }
}

/* ========================================
   MOBILE
   ======================================== */

@media (max-width: 768px) {
  .cb-cal__head {
    grid-template-columns: 44px 1fr 44px;
    gap: 8px;
    padding: 14px 14px 16px;
  }

  .cb-cal__title {
    font-size: 20px;
  }

  .cb-cal__weekdays {
    gap: 6px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .cb-cal__weekdays > div {
    min-width: 0;
    width: auto;
    text-align: center;
  }

  .cb-cal__grid {
    gap: 6px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .cb-cal__cell,
  .cb-cal__grid button,
  .cb-cal__grid .cb-cal__cell {
    min-height: 62px;
    border-radius: 14px;
  }

  .cb-empty-day {
    min-height: 62px;
  }

  .cb-cal__num {
    left: 7px;
    bottom: 7px;
    font-size: 14px;
  }

  .cb-cal__badge {
    top: 5px;
    right: 5px;
    font-size: 10px;
    padding: 2px 6px;
  }

  .cb-cal__grid .cb-selected,
  .cb-cal__grid .active,
  .cb-cal__grid .is-selected,
  .cb-cal__grid .cb-has-free.cb-selected,
  .cb-cal__grid .cb-has-free.active,
  .cb-cal__grid .cb-has-free.is-selected,
  .cb-cal__grid .is-available.cb-selected,
  .cb-cal__grid .is-available.active,
  .cb-cal__grid .is-available.is-selected {
    background: linear-gradient(180deg, #2f80ed 0%, #1f6fd9 100%);
    color: #ffffff;
    border-color: #1f6fd9;
    box-shadow: 0 10px 22px rgba(47, 128, 237, 0.22);
  }

  .cb-cal__day {
    margin: 0 12px 12px;
    padding: 16px;
    border-radius: 18px;
  }

  .cb-terms-modal {
    padding: 10px;
  }

  .cb-terms-box {
    width: 100%;
    margin: 10px auto;
    padding: 18px;
    border-radius: 10px;
  }

  .cb-terms-header h2 {
    font-size: 22px;
  }

  .cb-terms-content h3 {
    font-size: 16px;
  }

  .cb-terms-content p {
    font-size: 14px;
    line-height: 1.55;
  }
}

/* ========================================
   MY BOOKINGS MOBILE
   ======================================== */

@media (max-width: 767px) {
  .cb-my-bookings__title {
    font-size: 30px;
    margin-bottom: 12px;
  }

  .cb-my-bookings__content {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .cb-my-bookings .cb-table,
  .cb-my-bookings .cb-table thead,
  .cb-my-bookings .cb-table tbody,
  .cb-my-bookings .cb-table tr,
  .cb-my-bookings .cb-table th,
  .cb-my-bookings .cb-table td {
    display: block;
    width: 100%;
  }

  .cb-my-bookings .cb-table {
    margin: 0;
  }

  .cb-my-bookings .cb-table thead {
    display: none;
  }

  .cb-my-bookings .cb-table tbody {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .cb-my-bookings .cb-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 14px;
    align-items: start;
    padding: 14px 16px;
    border: 1px solid #d9eee2;
    border-radius: 18px;
    background: #f7fcf9;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.05);
  }

  .cb-my-bookings .cb-table tbody td {
    width: auto;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent !important;
    font-size: 15px;
    line-height: 1.4;
  }

  .cb-my-bookings .cb-table tbody td:nth-child(1),
  .cb-my-bookings .cb-table tbody td:nth-child(2),
  .cb-my-bookings .cb-table tbody td:nth-child(3) {
    grid-column: 1;
  }

  .cb-my-bookings .cb-table tbody td:nth-child(4),
  .cb-my-bookings .cb-table tbody td:nth-child(5) {
    grid-column: 2;
    justify-self: end;
  }

  .cb-my-bookings .cb-table tbody td:nth-child(1) {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    color: #0b0833;
    margin-bottom: 2px;
  }

  .cb-my-bookings .cb-table tbody td:nth-child(2) {
    font-size: 15px;
    color: #101828;
  }

  .cb-my-bookings .cb-table tbody td:nth-child(3) {
    font-size: 15px;
    font-family: monospace;
    font-weight: 600;
    color: #5f6b73;
  }

  .cb-my-bookings .cb-table tbody td:nth-child(4) {
    align-self: start;
    font-size: 15px;
    font-weight: 800;
    color: #166534;
    white-space: nowrap;
  }

  .cb-my-bookings .cb-table tbody td:nth-child(5) {
    align-self: start;
    margin-top: 4px;
  }

  .cb-my-bookings .cb-table tbody td:nth-child(5) form,
  .cb-my-bookings .cb-actions,
  .cb-my-bookings__actions {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    margin: 0;
  }

  .cb-my-bookings .cb-btn-secondary {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 12px;
  }
}

/* ========================================
   PHONE TUNING
   ======================================== */

@media (max-width: 560px) {
  .cb-cal-wrap {
    padding: 0 10px;
    margin: 16px auto;
  }

  .cb-cal-card {
    border-radius: 18px;
  }

  .cb-cal__topbar {
    padding: 14px 14px 0;
  }

  .cb-cal__head {
    grid-template-columns: 40px 1fr 40px;
    gap: 8px;
    padding: 12px 14px 14px;
  }

  .cb-cal__title {
    font-size: 18px;
    line-height: 1.15;
  }

  .cb-cal__nav {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 22px;
  }

  .cb-cal__weekdays {
    padding: 0 14px 8px;
    gap: 4px;
  }

  .cb-cal__weekdays > div {
    font-size: 10px;
    letter-spacing: 0.02em;
  }

  .cb-cal__grid {
    padding: 0 14px 14px;
    gap: 4px;
  }

  .cb-cal__cell,
  .cb-cal__grid button,
  .cb-cal__grid .cb-cal__cell,
  .cb-empty-day {
    min-height: 50px;
    padding: 0;
    border-radius: 12px;
  }

  .cb-cal__num {
    left: 6px;
    bottom: 6px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
  }

  .cb-cal__badge {
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    font-size: 8px;
    line-height: 16px;
    text-align: center;
    font-weight: 700;
  }

  .cb-cal__grid .cb-empty-day {
    opacity: 0.45;
  }

  .cb-cal__grid .cb-has-free:not(.cb-selected):not(.active):not(.is-selected),
  .cb-cal__grid .is-available:not(.cb-selected):not(.active):not(.is-selected) {
    background: #ffffff;
    border-color: #b9d8ff;
  }

  .cb-cal__grid .cb-selected,
  .cb-cal__grid .active,
  .cb-cal__grid .is-selected,
  .cb-cal__grid .cb-has-free.cb-selected,
  .cb-cal__grid .cb-has-free.active,
  .cb-cal__grid .cb-has-free.is-selected,
  .cb-cal__grid .is-available.cb-selected,
  .cb-cal__grid .is-available.active,
  .cb-cal__grid .is-available.is-selected {
    background: linear-gradient(180deg, #2f80ed 0%, #1f6fd9 100%);
    color: #ffffff;
    border-color: #1f6fd9;
    box-shadow: 0 8px 16px rgba(47, 128, 237, 0.18);
  }

  .cb-cal__grid .cb-today,
  .cb-cal__grid .is-today {
    outline-width: 1px;
    outline-offset: 1px;
  }

  .cb-cal__legend {
    padding: 0 14px 14px;
    gap: 12px;
    font-size: 12px;
  }

  .cb-cal__day {
    margin: 0 10px 10px;
    padding: 14px;
    border-radius: 16px;
  }

  .cb-cal__daytitle {
    font-size: 18px;
  }
}

/* ========================================
   SMALL / SHORT SCREENS FOR TERMS
   ======================================== */

@media (max-width: 480px), (max-height: 740px) {
  .cb-terms-modal {
    padding: 0;
  }

  .cb-terms-box {
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    border-radius: 0;
    padding: 14px 14px 18px;
    box-shadow: none;
  }

  .cb-terms-header {
    top: 0;
    padding-top: max(4px, env(safe-area-inset-top));
  }

  .cb-terms-header h2 {
    font-size: 20px;
  }

  .cb-terms-close {
    font-size: 28px;
  }

  .cb-terms-content h3 {
    font-size: 15px;
    margin-top: 16px;
  }

  .cb-terms-content p {
    font-size: 14px;
    line-height: 1.5;
  }
}

/*-------------Новое--------------------------*/

.cb-cancel-form {
  margin: 10px;
  display: inline-block;
}

.cb-cal__badge--full {
  background: #d1d5db;
  color: #6b7280;
}

.cb-cal__cell.is-booked {
  border-color: #d7dde5;
}

.cb-balance-pill {
  cursor: pointer;
}

.cb-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  color: #2563eb; /* nice blue */
  cursor: pointer;
  text-decoration: underline;
  font-weight: 500;
}

.cb-link-btn:hover {
  color: #1d4ed8;
  text-decoration: none;
}

.cb-link-btn:focus {
  outline: none;
}

#cb-team-hint {
  color: #0073aa;
  margin-left: 6px;
  font-size: 0.9em;
}

/* ===== Trainer button in header ===== */
.cb-trainer-header {
  display: flex;
  justify-content: center;
  align-items: center;
}

.cb-trainer-header .cb-trainer-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 42px;
  padding: 0 18px !important;

  background: linear-gradient(180deg, #ffffff 0%, #f3f5f8 100%) !important;
  color: #111827 !important;
  text-decoration: none !important;

  border: 1px solid rgba(17, 24, 39, 0.08) !important;
  border-radius: 999px !important;

  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;

  box-shadow:
    0 8px 18px rgba(17, 24, 39, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.cb-trainer-header .cb-trainer-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 113, 177, 0.25) !important;
  box-shadow:
    0 12px 24px rgba(17, 24, 39, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.cb-trainer-header .cb-trainer-btn:active {
  transform: translateY(0);
  box-shadow:
    0 6px 14px rgba(17, 24, 39, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.cb-trainer-header .cb-trainer-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(34, 113, 177, 0.18),
    0 8px 18px rgba(17, 24, 39, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.cb-trainer-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cb-trainer-btn__icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.cb-trainer-btn__text {
  display: inline;
}

@media (max-width: 782px) {
  .cb-trainer-header .cb-trainer-btn {
    min-height: 38px;
    padding: 0 14px !important;
    font-size: 14px;
  }

  .cb-trainer-btn__icon svg {
    width: 17px;
    height: 17px;
  }
}

@media (max-width: 640px) {
  .cb-header,
  .cb-topbar,
  .site-header-inner,
  .site-header .inside-header,
  .site-branding-container {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center;
    gap: 8px;
  }

  .cb-trainer-header {
    width: 100%;
    order: 99;
    justify-content: center;
    margin-top: 8px;
  }

  .cb-trainer-header .cb-trainer-btn {
    width: auto;
    min-width: unset;
    height: 36px;
    min-height: 36px;
    padding: 0 14px !important;
    gap: 8px;
  }

  .cb-trainer-btn__text {
    display: inline !important;
  }

  .cb-trainer-btn__icon {
    display: inline-flex !important;
  }
}
@media (max-width: 640px) {
  .wp-block-group.alignwide.is-content-justification-space-between.is-nowrap.is-layout-flex.wp-block-group-is-layout-flex {
    flex-wrap: wrap !important;
    row-gap: 8px;
  }

  .wp-block-group.alignwide.is-content-justification-space-between.is-nowrap.is-layout-flex.wp-block-group-is-layout-flex > .cb-trainer-header {
    flex: 0 0 100%;
    order: 99;
    display: flex;
    justify-content: center;
    margin-top: 8px;
  }

  .wp-block-group.alignwide.is-content-justification-space-between.is-nowrap.is-layout-flex.wp-block-group-is-layout-flex > .cb-trainer-header .cb-trainer-btn {
    width: auto;
    min-width: unset;
    height: 36px;
    min-height: 36px;
    padding: 0 14px !important;
    gap: 8px;
  }

  .wp-block-group.alignwide.is-content-justification-space-between.is-nowrap.is-layout-flex.wp-block-group-is-layout-flex > .cb-trainer-header .cb-trainer-btn__text {
    display: inline !important;
  }

  .wp-block-group.alignwide.is-content-justification-space-between.is-nowrap.is-layout-flex.wp-block-group-is-layout-flex > .cb-trainer-header .cb-trainer-btn__icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
}