/* Page-specific styles for the self-serve registration flow. */

/* Make legacy `form-control` (Bootstrap-style) match our design-system input. */
.form-control {
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  width: 100%;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  box-sizing: border-box;
}
.form-control:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ---------- start.html tabs + OTP panel ---------- */
.rg-start-header {
  margin-bottom: 14px;
}
.rg-start-header h1 {
  margin: 0 0 0.35rem;
}
.rg-start-intro {
  margin: 0;
  max-width: 820px;
}
.rg-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.rg-tab {
  background: none;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.rg-tab:hover { color: var(--text); }
.rg-tab.is-active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.rg-panel { display: none; }
.rg-panel.is-active { display: block; }
.rg-panel-title {
  margin: 0 0 0.15rem;
  line-height: 1.15;
}
.rg-panel-intro {
  margin: 0 0 14px;
  line-height: 1.3;
}

.rg-form-error { display: block; }
.rg-form-error.is-hidden { display: none; }
.is-hidden { display: none !important; }

/* ---------- shared step navigation ---------- */
.rg-step-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.rg-step-header h1 { margin: 0 0 0.25rem; }
.rg-step-header p { margin-top: 0; }
.rg-step-back {
  flex: 0 0 auto;
  margin-top: 4px;
}
.rg-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--brand);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25;
  text-decoration: none;
}
.rg-back-link:hover {
  color: var(--brand-dark);
}
.rg-back-button {
  border: 0;
  padding: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}
.rg-back-link-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}
.rg-checkout-back-form {
  margin: 0;
}
.rg-checkout-back-idle,
.rg-checkout-back-loading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rg-back-button:disabled,
.rg-checkout-back-inline-link:disabled {
  cursor: wait;
  opacity: 0.72;
}
.rg-back-button.is-loading {
  color: var(--text-muted);
}
.rg-checkout-back-loading .spinner {
  flex: 0 0 auto;
}
.rg-stepper {
  max-width: 760px;
  margin: 0 auto 14px;
}
.rg-stepper-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.rg-stepper-item {
  position: relative;
  min-width: 0;
}
.rg-stepper-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 12px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 1px;
  background: var(--border);
  pointer-events: none;
}
.rg-stepper-item.is-complete:not(:last-child)::after {
  background: var(--brand);
}
.rg-stepper-control {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  appearance: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  text-align: center;
  text-decoration: none;
}
.rg-stepper-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}
.rg-stepper-label {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
}
.rg-stepper-item.is-complete .rg-stepper-index {
  border-color: var(--brand);
  background: rgba(37, 99, 235, 0.08);
  color: var(--brand);
}
.rg-stepper-item.is-current .rg-stepper-control {
  color: var(--text);
}
.rg-stepper-item.is-current .rg-stepper-index {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--bg);
}
/* Back-from-checkout is a POST (cleans up checkout state + Stripe intent), so
   the links are forms with buttons styled to match. */
.rg-checkout-back-inline-form { display: inline; }
.rg-checkout-back-inline-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- particulars.html ---------- */
.rg-parent-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 12px;
  position: relative;
}
.rg-parent-card legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  padding: 0 6px;
}
.rg-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  justify-content: flex-end;
}
.rg-add-parent {
  margin-top: 0.75rem;
  border-color: var(--brand);
  color: var(--brand);
  min-height: 2.25rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.5;
}
.rg-add-parent:hover {
  border-color: var(--brand-dark);
  color: var(--brand-dark);
}
.rg-remove-parent {
  color: var(--danger);
  font-size: 0.75rem;
  line-height: 1.5;
}
.rg-remove-parent:hover {
  color: var(--danger);
}
.rg-school-other-row.is-hidden { display: none; }
.rg-parent-other-type-row.is-hidden { display: none; }
.rg-public-form-fields {
  --rg-field-height: 2.25rem;
  --rg-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}
.rg-public-form-fields .field-row {
  margin-bottom: 0;
}
.rg-public-form-fields .field-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
}
.rg-public-form-fields .form-control,
.rg-public-form-fields .form-select-phone-prefix,
.rg-public-form-fields .ss-trigger,
.rg-public-form-fields .ss-search,
.rg-public-form-fields .ss-option {
  font-size: 0.75rem;
  letter-spacing: 0;
  line-height: 1.5;
}
.rg-public-form-fields .form-select-phone-prefix {
  min-height: var(--rg-field-height);
  padding: 0.5rem 0.625rem;
  border: 0.0625rem solid var(--color-border-subtle);
  border-radius: 0.25rem;
  color: var(--text);
}
.rg-public-form-fields .form-control {
  padding: 0.5rem 0.625rem;
  border: 0.0625rem solid var(--color-border-subtle);
  border-radius: 0.25rem;
  color: var(--text);
  min-height: var(--rg-field-height);
}
.rg-public-form-fields .field-error,
#form-rg-particulars .address-grid .field-error {
  margin-top: 0.25rem;
  color: var(--danger);
  font-size: 0.75rem;
  line-height: 1.4;
}
.rg-public-form-fields .field-row.has-error .form-control,
.rg-public-form-fields .field-row.has-error .form-select-phone-prefix,
.rg-public-form-fields .field-row.has-error .ss-trigger,
#form-rg-particulars .address-field.has-error .form-control,
#form-rg-particulars .address-input.has-error .form-control {
  border-color: var(--danger);
  box-shadow: 0 0 0 0.125rem rgba(220, 38, 38, 0.12);
}
.rg-public-form-fields .field-row.has-error .form-control:focus,
.rg-public-form-fields .field-row.has-error .form-select-phone-prefix:focus,
.rg-public-form-fields .field-row.has-error .ss-trigger:focus,
#form-rg-particulars .address-field.has-error .form-control:focus,
#form-rg-particulars .address-input.has-error .form-control:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 0.1875rem rgba(220, 38, 38, 0.16);
}
.rg-public-form-fields .form-control::placeholder {
  color: var(--text-muted);
  opacity: 1;
}
.rg-public-form-fields .form-control.is-placeholder-value {
  color: var(--text-muted);
}
.rg-public-form-fields .form-control option {
  color: var(--text);
}
.rg-public-form-fields .form-control option[value=""] {
  color: var(--text-muted);
}
.rg-public-form-fields select.form-control {
  -webkit-appearance: none;
  appearance: none;
  background-image: var(--rg-select-arrow);
  background-position: right 0.625rem center;
  background-repeat: no-repeat;
  background-size: 0.875rem 0.875rem;
  padding-right: 1.5rem;
}
.rg-public-form-fields .ss-wrapper {
  max-width: none;
  --search-select-border-color: var(--color-border-subtle);
  --color-text-default: var(--text);
  --color-text-muted: var(--text-muted);
}
.rg-public-form-fields .ss-placeholder {
  color: var(--color-text-muted);
}
.rg-public-form-fields .ss-trigger {
  border-color: var(--color-border-subtle);
  border-radius: 0.25rem;
  color: var(--color-text-default);
  background-image: var(--rg-select-arrow);
  background-position: right 0.625rem center;
  background-size: 0.875rem 0.875rem;
  height: var(--rg-field-height);
  padding-left: 0.625rem;
  padding-right: 1.5rem;
}
.rg-public-form-fields input[type="date"] {
  cursor: pointer;
}
.rg-phone-fields {
  display: grid;
  grid-template-columns: minmax(7.5rem, 9.5rem) minmax(0, 1fr);
  gap: 0.5rem;
}
.rg-phone-prefix-field,
.rg-phone-number-field {
  min-width: 0;
}
.rg-phone-prefix-field .ss-wrapper {
  width: 100%;
}
.rg-contact-card-actions {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}
#form-rg-particulars .address-grid .form-control {
  height: 2.25rem;
  min-height: 2.25rem;
  padding: 0.5rem 0.625rem;
  font-size: 0.75rem;
  line-height: 1.5;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .rg-public-form-fields {
    grid-template-columns: 1fr;
  }
  .rg-phone-fields {
    grid-template-columns: 1fr;
  }
  .rg-contact-card-actions {
    position: static;
  }
}

/* Locked phone display on the new-student particulars page. */
.rg-locked-phone {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 14px;
  font-family: inherit;
  user-select: text;
}
.rg-public-form-fields .rg-locked-phone {
  display: flex;
  align-items: center;
  min-height: var(--rg-field-height);
  padding: 0.5rem 0.75rem;
  border-color: var(--color-border-subtle);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0;
}
.rg-locked-phone-value { font-weight: 600; color: var(--text); }

/* ---------- classes.html ---------- */
.rg-classes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Bridge: the staff class-search / class-summary CSS uses CSS variables that
   only live in studio/base.html. Map them to base_public.html's tokens here so
   the imported partials render correctly. */
:root {
  --color-border-subtle: var(--border);
  --color-border-form: var(--border-strong);
  --color-border-hover: var(--brand);
  --color-bg-white: var(--bg);
  --color-bg-light-gray: var(--bg-subtle);
  --color-text-dark: var(--text);
  --color-text-default: var(--text);
  --color-text-muted: var(--text-muted);
  --color-neutral-label: var(--text-muted);
  --color-primary: var(--brand);
  --color-success: var(--success);
  --color-danger: var(--danger);
  --color-danger-text: var(--danger);
  --color-success-brand: var(--success);
  --color-bg-table-hover: var(--bg-muted);
  --color-neutral-text-muted: var(--text-muted);
}

/* Class-search filter row — copied verbatim from staff
   class_search_filters.html so the look matches 1:1. */
.class-search-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
  align-items: end;
}
.class-search-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.class-search-filter-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}
.class-search-filter-field .form-select,
.class-search-filter-field select {
  height: 2.25rem;
  font-size: 0.8125rem;
  padding: 0 0.5rem;
  border: 0.0625rem solid var(--border);
  border-radius: 0.375rem;
  background: var(--bg);
}
.btn-class-search {
  height: 2.25rem;
  padding: 0 1.25rem;
  background: var(--brand);
  color: #fff;
  border: 0.0625rem solid var(--brand);
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
}
.btn-class-search:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

.class-search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.class-search-results-title { margin: 0; font-size: 1rem; font-weight: 700; }
.rg-programme-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}
.rg-programme-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--brand);
  border-radius: 0.375rem;
  background: var(--bg);
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}
.rg-programme-chip:hover {
  background: #eff6ff;
  color: var(--brand-dark);
}
.rg-programme-chip.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* Fees Breakdown specific (registration variant) */
.class-enrolment-summary-panel { padding: 1rem; }
.class-enrolment-summary-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}
.class-enrolment-summary-title[data-registration-agent-unlock-trigger] {
  user-select: none;
}
.class-enrolment-summary-pricing-no-margin { margin: 0; }
.class-enrolment-summary-item-separator {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: var(--bg);
}
.class-enrolment-summary-item-pending-join {
  border-color: #f59e0b;
  background: #fffbeb;
}
.layout-enrolment-summary-class-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}
.class-summary-class-details {
  min-width: 0;
}
#enrolment-fees-breakdown .class-enrolment-summary-item-separator .class-summary-title,
#checkout-code-controls .class-enrolment-summary-item-separator .class-summary-title {
  color: var(--text);
  font-size: 0.95rem !important;
  font-weight: 800;
  line-height: 1.25;
}
#enrolment-fees-breakdown .class-summary-class-meta,
#checkout-code-controls .class-summary-class-meta {
  margin-top: 0.1875rem;
  color: var(--text-muted);
  font-size: 0.75rem !important;
  line-height: 1.35;
}
#enrolment-fees-breakdown .class-summary-tuition-period,
#checkout-code-controls .class-summary-tuition-period {
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}
#enrolment-fees-breakdown .class-summary-tuition-period-amount,
#enrolment-fees-breakdown .class-summary-tuition-period span:last-child,
#checkout-code-controls .class-summary-tuition-period-amount,
#checkout-code-controls .class-summary-tuition-period span:last-child {
  color: var(--text);
}
#enrolment-fees-breakdown .class-summary-discount-row,
#enrolment-fees-breakdown .class-summary-discount-row span:last-child,
#checkout-code-controls .class-summary-discount-row,
#checkout-code-controls .class-summary-discount-row span:last-child {
  color: var(--success);
  font-weight: 600;
}
.rg-renewal-transition-card {
  display: grid;
  gap: 0.625rem;
  margin-bottom: 1rem;
}
.rg-renewal-transition-heading {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}
.rg-renewal-transition-node {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg);
}
.rg-renewal-transition-node-new {
  border-color: rgba(37, 99, 235, 0.35);
  background: #eff6ff;
}
.rg-renewal-transition-label {
  display: block;
  margin-bottom: 0.125rem;
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}
.rg-renewal-transition-title {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.rg-renewal-transition-meta {
  display: block;
  margin-top: 0.1875rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.rg-renewal-transition-arrow {
  display: flex;
  justify-content: center;
  color: var(--brand);
}
.rg-renewal-transition-arrow-icon {
  width: 1rem;
  height: 1rem;
}
#enrolment-fees-breakdown .class-summary-tuition-period-date,
#checkout-code-controls .class-summary-tuition-period-date {
  color: var(--text-muted);
}
.btn-enrolment-summary-remove-class {
  flex: 0 0 auto;
  height: 1.5rem;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  line-height: 1;
  color: var(--danger);
  border: 0.0625rem solid var(--danger);
  background: none;
  border-radius: 0.25rem;
  cursor: pointer;
}
.btn-enrolment-summary-remove-class:hover {
  background: var(--danger);
  color: var(--bg);
}
.class-enrolment-summary-join-date-container {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.375rem;
}
.class-summary-join-date-display {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.1875rem;
  color: var(--text-muted);
  font-size: 0.75rem !important;
  line-height: 1.35;
}
.class-summary-join-date-text {
  overflow-wrap: anywhere;
}
.class-summary-renewal-plan-display {
  margin-top: 0.1875rem;
  color: var(--text-muted);
  font-size: 0.75rem !important;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.class-summary-renewal-plan-label {
  color: var(--text-muted);
  font-weight: 400;
}
.class-summary-join-date-text.is-required {
  color: #b45309;
  font-weight: 600;
}
.class-summary-join-date-edit {
  display: inline-flex;
  align-items: center;
}
.class-summary-join-date-edit[open] {
  display: block;
  flex-basis: 100%;
}
.btn-class-summary-edit-join-date {
  display: inline-flex;
  align-items: center;
  min-height: 1.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  list-style: none;
  cursor: pointer;
}
.btn-class-summary-edit-join-date::-webkit-details-marker {
  display: none;
}
.btn-class-summary-edit-join-date:hover {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 0.125rem;
}
.label-class-summary-save-join-date {
  display: none;
}
.class-summary-join-date-edit[open] .label-class-summary-edit-join-date {
  display: none;
}
.class-summary-join-date-edit[open] .label-class-summary-save-join-date {
  display: inline;
}
.class-summary-join-date-edit-form {
  margin-top: 0.375rem;
}
.class-summary-join-date-pending-form {
  width: min(100%, 14rem);
}
.class-enrolment-summary-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}
.class-enrolment-summary-required { color: var(--danger); }
.class-enrolment-join-date-select,
.class-selection-select {
  height: 2rem;
  font-size: 0.8125rem;
  padding: 0 2.75rem 0 0.75rem;
  border: 0.0625rem solid var(--border);
  border-radius: 0.375rem;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231f2937' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 0.875rem center;
  background-repeat: no-repeat;
  background-size: 0.875rem 0.875rem;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
}
#enrolment-fees-breakdown .class-enrolment-join-date-select {
  background-color: #fff;
}
.class-enrolment-join-date-select.is-required,
.class-selection-select.is-required {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}
.class-enrolment-summary-spacing {
  height: 0;
  margin: 0.75rem 0;
  border-top: 1px solid var(--border);
}
.class-enrolment-summary-totals-section {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}
.registration-final-totals-breakdown {
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  border-top: 0;
}
.row-enrolment-summary-voucher-discount,
.class-summary-row,
.class-summary-row-gst,
.class-summary-total-row,
.class-summary-fee-row,
.class-summary-tuition-period {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}
#enrolment-fees-breakdown .class-summary-fee-row,
#checkout-code-controls .class-summary-fee-row {
  align-items: flex-start;
}
#enrolment-fees-breakdown .class-summary-fee-label,
#checkout-code-controls .class-summary-fee-label {
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.35;
}
#enrolment-fees-breakdown .registration-final-totals-breakdown .class-summary-row,
#enrolment-fees-breakdown .registration-final-totals-breakdown .class-summary-row-gst,
#checkout-code-controls .registration-final-totals-breakdown .class-summary-row,
#checkout-code-controls .registration-final-totals-breakdown .class-summary-row-gst {
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}
#enrolment-fees-breakdown .registration-final-totals-breakdown + .class-summary-total-row,
#checkout-code-controls .registration-final-totals-breakdown + .class-summary-total-row {
  color: var(--brand);
  font-size: 1.125rem;
  line-height: 1.25;
  font-weight: 800;
  margin-top: 0.375rem;
  padding-top: 0.375rem;
}
.class-summary-billing-cycle {
  margin-top: 0.625rem;
}
.class-summary-deposit-title-row,
.class-summary-tuition-title-row {
  margin-bottom: 0.125rem;
}
.class-summary-deposit-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}
#enrolment-fees-breakdown .class-summary-deposit-amount,
#checkout-code-controls .class-summary-deposit-amount {
  color: var(--text);
}
.class-summary-billing-cycle + .class-summary-billing-cycle {
  margin-top: 0.625rem;
}
.class-summary-class-total-row {
  margin-top: 0.875rem;
}
#checkout-code-controls .class-summary-class-total-row,
#checkout-code-controls .class-summary-class-total-row .class-summary-card-total {
  color: var(--brand);
  font-size: 1rem;
  font-weight: 800;
}
.class-summary-card-total {
  color: var(--text);
}
.row-enrolment-summary-voucher-discount {
  color: var(--success);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-top: 0.375rem;
}
.row-enrolment-summary-voucher-discount .amount-enrolment-summary-voucher-discount {
  color: var(--success);
}
.row-enrolment-summary-registration-discount {
  font-size: 0.75rem;
}
.group-registration-code-toggles {
  display: grid;
  gap: 0.625rem;
  margin: 0.875rem 0 0;
}
.card-registration-code-toggle {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg);
}
.card-registration-code-input {
  overflow: visible;
}
.card-registration-code-input:hover,
.card-registration-code-input:focus-within {
  z-index: 30;
}
.card-registration-code-input .row-registration-code-toggle {
  min-height: auto;
  padding-bottom: 0.5rem;
  cursor: default;
}
.card-registration-code-input .body-registration-code-toggle {
  display: block;
}
.card-registration-code-toggle-agent.is-registration-agent-gated {
  display: none;
}
#enrolment-fees-breakdown.is-registration-agent-unlocked .card-registration-code-toggle-agent.is-registration-agent-gated {
  display: block;
}
.registration-agent-toast-region {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}
.registration-agent-toast {
  max-width: min(20rem, calc(100vw - 2rem));
  padding: 0.75rem 1rem;
  border: 1px solid var(--success);
  border-radius: 0.5rem;
  background: var(--success-bg);
  color: var(--success);
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: 0 0.5rem 1.5rem rgba(31, 41, 55, 0.16);
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 180ms ease, transform 180ms ease;
}
.registration-agent-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.input-registration-code-switch {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.row-registration-code-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.75rem;
  cursor: pointer;
}
.label-registration-code-toggle-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.registration-referral-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--brand);
}
.icon-registration-referral-help {
  width: 0.875rem;
  height: 0.875rem;
  flex: 0 0 auto;
}
.tooltip-registration-referral-help {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.5rem);
  z-index: 40;
  display: none;
  width: min(15rem, calc(100vw - 2rem));
  padding: 0.5rem 0.625rem;
  border-radius: 0.375rem;
  background: var(--text);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  transform: translateX(-50%);
  box-shadow: 0 0.375rem 1rem rgba(31, 41, 55, 0.18);
}
.registration-referral-help:hover .tooltip-registration-referral-help,
.registration-referral-help:focus .tooltip-registration-referral-help,
.registration-referral-help:focus-within .tooltip-registration-referral-help {
  display: block;
}
.icon-registration-code-toggle {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}
.control-registration-code-switch {
  display: inline-flex;
  flex: 0 0 auto;
}
.track-registration-code-switch {
  position: relative;
  display: inline-flex;
  width: 2.75rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background 160ms ease;
}
.thumb-registration-code-switch {
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 999px;
  background: var(--bg);
  transition: transform 160ms ease;
}
.input-registration-code-switch:checked + .row-registration-code-toggle .track-registration-code-switch {
  background: var(--brand);
}
.input-registration-code-switch:checked + .row-registration-code-toggle .thumb-registration-code-switch {
  transform: translateX(1.25rem);
}
.input-registration-code-switch:focus-visible + .row-registration-code-toggle .track-registration-code-switch {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.input-registration-code-switch:not(:checked) ~ .body-registration-code-toggle {
  display: none;
}
.body-registration-code-toggle {
  padding: 0 0.75rem 0.75rem;
}
.card-enrolment-summary-voucher-applied {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  background: var(--bg-muted);
}
.icon-enrolment-summary-voucher-tag,
.icon-enrolment-summary-voucher-remove {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}
.icon-enrolment-summary-voucher-tag { color: var(--brand); }
.column-enrolment-summary-voucher-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}
.label-enrolment-summary-voucher-name,
.label-enrolment-summary-voucher-code {
  overflow-wrap: anywhere;
}
.label-enrolment-summary-voucher-name {
  font-size: 0.8125rem;
  font-weight: 600;
}
.label-enrolment-summary-voucher-code {
  color: var(--text-muted);
  font-size: 0.75rem;
}
.form-registration-code-remove { margin: 0; }
.btn-enrolment-summary-voucher-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.25rem;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
}
.btn-enrolment-summary-voucher-remove:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-bg);
}
.row-enrolment-summary-voucher-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  margin: 0;
}
.input-enrolment-summary-voucher-code {
  font-size: 0.75rem;
}
.input-enrolment-summary-voucher-code::placeholder {
  font-size: 0.75rem;
  text-transform: none;
}
.btn-enrolment-summary-voucher-apply {
  height: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--brand);
  border-radius: 0.375rem;
  background: var(--brand);
  color: var(--bg);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
}
.btn-enrolment-summary-voucher-apply:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}
.input-registration-code-uppercase { text-transform: uppercase; }
.registration-terms-agreement {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.875rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}
.registration-terms-checkbox {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: 0.0625rem 0 0;
  cursor: pointer;
}
.registration-terms-label {
  min-width: 0;
}
.registration-terms-label label {
  cursor: pointer;
}
.registration-terms-link {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 0.125rem;
}
.registration-terms-link:hover {
  color: var(--brand-dark);
}
.registration-terms-agreement-checkout {
  padding-top: 0.125rem;
}
.link-registration-checkout-continue { margin-top: 1rem; }
.link-registration-checkout-continue.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn.is-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* checkbox column on the class card */
.class-select-checkbox { width: 1rem; height: 1rem; cursor: pointer; }

/* ---------- checkout.html ---------- */
.rg-checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.rg-checkout-primary,
.rg-checkout-sidebar {
  min-width: 0;
}
.rg-fee-summary-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.rg-fee-summary-heading h2 {
  margin: 0;
}
.rg-fee-summary-edit-form {
  flex: 0 0 auto;
  margin-top: 0.375rem;
}
.rg-fee-summary-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: right;
  cursor: pointer;
}
.rg-fee-summary-edit-link:hover {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 0.125rem;
}
.rg-fee-summary-edit-link:disabled {
  cursor: wait;
  opacity: 0.72;
}
.rg-selected-row + .rg-selected-row {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.rg-pricing-class-title {
  display: block;
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.rg-pricing-class-meta {
  display: block;
  margin-top: 0.1875rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}
.rg-payment-element {
  min-height: 40px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 12px;
  background: var(--bg);
}
.rg-pricing-line {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.375rem 0;
}
.rg-pricing-class-block {
  padding: 0.25rem 0 0.625rem;
}
.rg-pricing-class-block + .rg-pricing-class-block {
  border-top: 1px solid var(--border);
  padding-top: 0.625rem;
}
.rg-pricing-line-class {
  align-items: flex-start;
  padding: 0;
}
.rg-pricing-class-info {
  min-width: 0;
}
.rg-pricing-amount {
  flex: 0 0 auto;
  white-space: nowrap;
}
.rg-pricing-class-breakdown {
  margin-top: 0.375rem;
}
.rg-pricing-breakdown-group {
  margin-top: 0.375rem;
}
.rg-pricing-breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.25;
  padding: 0;
}
.rg-pricing-breakdown-title {
  color: #4b5563;
  font-weight: 600;
}
.rg-pricing-breakdown-row span:last-child {
  flex: 0 0 auto;
  text-align: right;
  white-space: nowrap;
}
.rg-pricing-breakdown-discount {
  color: var(--success);
  font-weight: 600;
}
.rg-pricing-line-registration-fee {
  border-top: 1px solid var(--border);
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  font-weight: 700;
}
.rg-pricing-line-registration-fee span:last-child {
  font-weight: 400;
}
.rg-pricing-line-registration-discount {
  padding-top: 0;
  padding-bottom: 0.25rem;
  font-size: 0.75rem;
  line-height: 1.25;
}
.rg-pricing-line-subtotal {
  border-top: 1px solid var(--border);
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  padding-bottom: 0.125rem;
}
.rg-pricing-line-gst {
  padding-top: 0.125rem;
}
.rg-pricing-line-discount {
  color: var(--success);
  font-weight: 600;
}
.rg-pricing-line-total {
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
}
.rg-pricing-line-total span:last-child {
  font-size: 1.25rem;
}

/* ---------- Public schedules ---------- */
.schedules-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.schedules-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.schedules-intro {
  max-width: 68rem;
  font-size: 1rem;
}
.schedule-programme-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.schedule-programme-option {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--brand);
  border-radius: 0.375rem;
  color: var(--brand);
  background: #fff;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}
.schedule-programme-option:hover {
  background: #eff6ff;
  color: var(--brand-dark);
  text-decoration: none;
}
.schedule-programme-option.is-active {
  background: var(--brand);
  color: #fff;
}
.schedules-filter-card,
.schedules-selected-card,
.schedules-results-card {
  margin-bottom: 0;
}
.schedules-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.schedule-selected-class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.75rem;
}
.schedule-selected-class {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  min-height: 6.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.schedule-selected-class-title {
  margin: 0 0 0.625rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}
.schedule-selected-class-meta {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.25rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.35;
}
.schedule-selected-class-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  color: var(--brand);
  stroke-width: 2;
}
.schedule-selected-class-remove {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #dc2626;
  cursor: pointer;
}
.schedule-selected-class-remove:hover {
  background: #b91c1c;
}
.schedule-selected-class-remove .schedule-selected-class-icon {
  color: currentColor;
}
.schedule-selected-empty {
  margin: 0;
}
.schedule-selected-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.schedule-preselect-submit {
  display: inline-flex;
  min-width: min(100%, 20rem);
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}
.schedule-preselect-submit [data-lucide] {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2.25;
}
.schedule-preselect-submit.is-loading {
  opacity: 0.7;
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .rg-step-header {
    flex-direction: column;
    align-items: stretch;
  }
  .rg-step-back {
    margin-top: 0;
    text-align: center;
  }
  .rg-stepper-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rg-stepper-item:not(:last-child)::after {
    display: none;
  }
  .row-enrolment-summary-voucher-input {
    grid-template-columns: 1fr;
  }
  .btn-enrolment-summary-voucher-apply {
    width: 100%;
  }
  .schedule-selected-class-grid {
    grid-template-columns: 1fr;
  }
  .schedule-preselect-submit {
    width: 100%;
  }
}

/* ---------- Tablet ---------- */
@media (min-width: 768px) {
  .rg-search-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Desktop ---------- */
@media (min-width: 1200px) {
  .rg-classes-grid {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }
  .rg-classes-summary { position: sticky; top: 16px; }
  .rg-checkout-grid { grid-template-columns: 3fr 2fr; align-items: start; }
  .rg-search-grid { grid-template-columns: repeat(3, 1fr); }
}
