:root {
  --wcb-purple: #4e2c7e;
  --wcb-purple-dark: #2f164f;
  --ink: #202125;
  --muted: #74717d;
  --line: #e7e3ec;
  --panel: #ffffff;
  --page: #fefcff;
  --field: #ffffff;
  --danger: #e83f4b;
  --success: #19b95f;
  --focus: #55c6e8;
  --soft: #f6f1fb;
  --shadow: 0 24px 70px rgba(47, 22, 79, 0.08);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero {
  background: linear-gradient(120deg, var(--wcb-purple), var(--wcb-purple-dark));
  color: white;
  padding: clamp(16px, 3vw, 24px) clamp(16px, 5vw, 72px);
}

.hero-inner {
  width: min(1120px, 100%);
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  border-radius: 4px;
}

.brand-logo {
  width: clamp(116px, 16vw, 196px);
  height: auto;
  display: block;
}

.portal-tag {
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: white;
  padding: 10px 16px;
  font-weight: 800;
  font-size: clamp(13px, 1.4vw, 15px);
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

main {
  flex: 1;
  padding: clamp(24px, 5vw, 72px) clamp(12px, 3vw, 24px);
}

.form-card {
  width: min(1080px, 100%);
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid rgba(78, 44, 126, 0.08);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-head {
  padding: clamp(30px, 5vw, 56px) clamp(22px, 5vw, 56px) 28px;
  border-bottom: 1px solid var(--line);
}

.programme-title {
  margin: 0 0 8px;
  color: var(--wcb-purple);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.25;
}

.form-title {
  margin: 0;
  color: var(--wcb-purple);
  font-size: clamp(21px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1.35;
}

.form-kicker {
  margin: 8px 0 0;
  color: var(--wcb-purple);
  font-size: 13px;
  font-weight: 600;
}

.form-body {
  padding: clamp(24px, 5vw, 56px);
}

.section {
  padding-top: 4px;
}

.section + .section {
  margin-top: clamp(32px, 5vw, 52px);
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid rgba(78, 44, 126, 0.13);
}

h2 {
  margin: 0 0 4px;
  color: var(--wcb-purple);
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 700;
  line-height: 1.3;
}

h3 {
  margin: 0 0 24px;
  color: var(--wcb-purple);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 28px) clamp(22px, 4vw, 36px);
}

.field {
  min-width: 0;
}

.field.full {
  grid-column: 1 / -1;
}

label,
.field-label {
  display: block;
  color: var(--wcb-purple);
  font-size: 15px;
  font-weight: 650;
  margin: 0 0 8px;
}

.required {
  color: var(--danger);
}

input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid #c9c5d2;
  border-radius: 8px;
  background-color: var(--field);
  color: var(--ink);
  padding: 13px 16px;
  outline: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.5 6.75L9 11.25L13.5 6.75' stroke='%23535A6A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 18px center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  padding-right: 52px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(85, 198, 232, 0.2);
}

.hint {
  margin: 6px 0 0;
  color: #8067a8;
  font-size: 12px;
}

.error-text {
  display: none;
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea,
.choice-wrap.is-invalid .choice-group,
.field.is-invalid .phone-field {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(232, 63, 75, 0.08);
}

.field.is-invalid .error-text,
.choice-wrap.is-invalid .error-text {
  display: block;
}

.native-select-source {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: -1px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.combo {
  position: relative;
}

.combo-input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #c9c5d2;
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  padding: 13px 52px 13px 16px;
  outline: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.combo-input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(85, 198, 232, 0.2);
}

.combo-toggle {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #4b5563;
  transform: translateY(-50%);
  cursor: pointer;
}

.combo-toggle::before,
.combo-toggle::after {
  position: absolute;
  top: 13px;
  width: 10px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.combo-toggle::before {
  left: 5px;
  transform: rotate(45deg);
}

.combo-toggle::after {
  right: 5px;
  transform: rotate(-45deg);
}

.combo.is-open .combo-toggle::before {
  transform: rotate(-45deg);
}

.combo.is-open .combo-toggle::after {
  transform: rotate(45deg);
}

.combo-menu,
.phone-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: none;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid rgba(78, 44, 126, 0.18);
  border-radius: 10px;
  background: white;
  box-shadow: 0 18px 38px rgba(32, 33, 37, 0.14);
  padding: 6px;
}

.combo.is-open .combo-menu,
.phone-field.is-open .phone-menu {
  display: grid;
  gap: 2px;
}

.combo-option,
.phone-option {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--wcb-purple);
  padding: 8px 12px;
  text-align: left;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.combo-option:hover,
.combo-option:focus,
.combo-option.is-selected,
.phone-option:hover,
.phone-option:focus,
.phone-option.is-selected {
  background: #ece8f2;
  color: var(--wcb-purple);
  outline: none;
}

.combo-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 14px;
}

.field.is-invalid .combo-input,
.combo.is-invalid .combo-input {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(232, 63, 75, 0.08);
}

.choice-group {
  min-height: 52px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  border: 1px solid transparent;
  padding: 8px 0;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.choice input {
  width: 18px;
  height: 18px;
  min-height: 0;
  accent-color: var(--wcb-purple);
  padding: 0;
}

.is-conditional[hidden] {
  display: none;
}

.phone-field {
  position: relative;
  display: grid;
  grid-template-columns: minmax(112px, auto) minmax(0, 1fr);
  align-items: stretch;
  min-height: 52px;
  border: 1px solid #c9c5d2;
  border-radius: 8px;
  background: var(--field);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.phone-field:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(85, 198, 232, 0.2);
}

.phone-field input[type="tel"] {
  min-height: 50px;
  border: 0;
  box-shadow: none;
  padding-left: 10px;
}

.phone-code-button {
  min-height: 50px;
  border: 0;
  border-right: 1px solid #e1e2ea;
  border-radius: 0;
  background: transparent;
  color: var(--wcb-purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

.flag {
  font-size: 20px;
  line-height: 1;
}

.phone-chevron {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  margin-left: 3px;
}

.phone-option {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  font-size: 14px;
}

.schedule-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.schedule-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.schedule-heading h2 {
  color: var(--wcb-purple);
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 700;
  line-height: 1.3;
}

.optional-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #eee8f5;
  color: var(--wcb-purple);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
}

.schedule-number {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  background: var(--wcb-purple);
  color: white;
  font-size: 16px;
  font-weight: 850;
}

.schedule-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.schedule-fields {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.7fr);
  align-items: start;
  gap: clamp(24px, 4vw, 40px);
  border-radius: 12px;
  background: #faf8fc;
  padding: clamp(18px, 3vw, 28px);
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.time-option {
  width: 100%;
  min-height: 48px;
  border: 1px solid #c9c5d2;
  border-radius: 8px;
  background: white;
  color: #2f343e;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.time-option:hover,
.time-option:focus {
  border-color: var(--wcb-purple);
  outline: none;
}

.time-option.is-selected {
  background: var(--wcb-purple);
  border-color: var(--wcb-purple);
  color: white;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: clamp(28px, 5vw, 44px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.btn {
  min-width: 154px;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(32, 33, 37, 0.12);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-submit,
.btn-next {
  background: var(--wcb-purple);
  color: white;
}

.success-panel {
  display: none;
  text-align: center;
  padding: clamp(44px, 7vw, 84px) clamp(20px, 5vw, 48px);
}

.success-panel.is-active {
  display: block;
}

.checkmark {
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--success);
  color: white;
  font-size: 42px;
  line-height: 1;
}

.success-panel h2 {
  text-transform: none;
  font-size: clamp(24px, 3.2vw, 34px);
}

.copy {
  margin: 8px auto 28px;
  color: var(--muted);
  max-width: 54ch;
}

.footer {
  background: var(--wcb-purple);
  color: white;
  padding: clamp(34px, 5vw, 52px) 16px 24px;
  text-align: center;
}

.footer-inner {
  width: min(1060px, 100%);
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 16px;
}

.footer-logo {
  width: min(140px, 44vw);
  height: auto;
  display: block;
}

.footer-address {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.6;
}

.footer-hours {
  margin: 0;
  font-weight: 800;
}

.socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.social {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.social:hover {
  opacity: 0.86;
  transform: translateY(-1px);
}

.social img {
  width: 36px;
  height: 36px;
  display: block;
}

.copyright {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  margin: 6px 0 0;
  padding-top: 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 860px) {
  .time-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .hero-inner {
    min-height: 0;
    align-items: center;
    flex-direction: column;
    gap: 14px;
  }

  .portal-tag {
    width: min(100%, 360px);
    white-space: normal;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .schedule-fields {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

@media (max-width: 500px) {
  main {
    padding-left: 10px;
    padding-right: 10px;
  }

  .form-head,
  .form-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .form-card {
    border-radius: 12px;
  }

  .brand-logo {
    width: min(148px, 56vw);
  }

  input,
  select,
  textarea,
  .combo-input,
  .phone-field {
    min-height: 50px;
  }

  select {
    background-position: right 14px center;
    padding-right: 44px;
  }

  .phone-field {
    grid-template-columns: 1fr;
  }

  .phone-code-button {
    justify-content: flex-start;
    border-right: 0;
    border-bottom: 1px solid #e1e2ea;
  }

  .phone-field input[type="tel"] {
    padding-left: 18px;
  }

  .schedule-heading {
    gap: 12px;
  }

  .schedule-number {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 14px;
  }

  .time-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .time-option {
    min-height: 44px;
  }

  .social,
  .social img {
    width: 34px;
    height: 34px;
  }
}

body.is-embedded {
  background: #ffffff;
}

body.is-embedded wcb-header,
body.is-embedded wcb-pre-application-header,
body.is-embedded wcb-footer,
body.is-embedded .hero {
  display: none;
}

body.is-embedded .page-shell {
  min-height: auto;
  padding: 0;
}

body.is-embedded main {
  padding: 0;
}

body.is-embedded .form-card {
  border: 0;
  box-shadow: none;
}
