.flex-enrol-open { overflow: hidden; }

.flex-enrol-overlay {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 27, 48, .68);
  backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}

.flex-enrol-overlay.is-active { opacity: 1; visibility: visible; pointer-events: auto; }

.flex-enrol-modal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.65fr);
  width: min(1050px, 100%);
  height: min(760px, calc(100svh - 48px));
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(7, 18, 35, .28);
  transform: translateY(14px) scale(.985);
  transition: transform .22s ease;
}

.flex-enrol-overlay.is-active .flex-enrol-modal { transform: none; }

.flex-enrol-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #dfe8ea;
  border-radius: 50%;
  color: #46596a;
  background: rgba(255,255,255,.94);
  box-shadow: 0 4px 16px rgba(25, 37, 66, .08);
}

.flex-enrol-close:hover { color: #192542; background: #f2f7f7; }
.flex-enrol-close svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.flex-enrol-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 48px 34px 32px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(255,255,255,.16), transparent 26%),
    linear-gradient(155deg, #192542 0%, #243b62 56%, #145f66 100%);
}

.flex-enrol-aside::after {
  content: '';
  position: absolute;
  right: -70px;
  bottom: -70px;
  width: 220px;
  height: 220px;
  border: 38px solid rgba(0, 173, 146, .22);
  border-radius: 50%;
}

.flex-enrol-eyebrow {
  align-self: flex-start;
  margin-bottom: 14px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: rgba(255,255,255,.09);
}

.flex-enrol-aside h2 { margin: 0 0 13px; color: #fff; font: 700 clamp(25px, 2.4vw, 34px)/1.12 'Outfit', sans-serif; }
.flex-enrol-aside > p { margin: 0; color: rgba(255,255,255,.74); font-size: 14px; line-height: 1.65; }

.flex-enrol-progress { display: grid; gap: 17px; margin: 38px 0 28px; padding: 0; list-style: none; }
.flex-enrol-progress li { position: relative; display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.48); font-size: 14px; font-weight: 650; }
.flex-enrol-progress li:not(:last-child)::after { content: ''; position: absolute; top: 29px; left: 14px; width: 1px; height: 16px; background: rgba(255,255,255,.2); }
.flex-enrol-progress span { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid rgba(255,255,255,.26); border-radius: 50%; font-size: 12px; }
.flex-enrol-progress li.is-active { color: #fff; }
.flex-enrol-progress li.is-active span { border-color: #00d5b4; background: #00ad92; box-shadow: 0 0 0 5px rgba(0,173,146,.18); }
.flex-enrol-progress li.is-complete { color: rgba(255,255,255,.76); }
.flex-enrol-progress li.is-complete span { color: #16334a; border-color: #9ceddf; background: #9ceddf; }

.flex-enrol-aside-note { position: relative; z-index: 1; display: flex; gap: 10px; margin-top: auto; padding: 14px; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; color: rgba(255,255,255,.76); background: rgba(255,255,255,.07); font-size: 12px; line-height: 1.55; }
.flex-enrol-aside-note svg { flex: 0 0 21px; width: 21px; fill: none; stroke: #59dfcb; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.flex-enrol-main { min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 48px 54px 38px; scrollbar-gutter: stable; }
.flex-enrol-main form { min-height: 100%; }
.flex-enrol-step { display: none; min-height: 100%; animation: flexStepIn .22s ease; }
.flex-enrol-step.is-active { display: flex; flex-direction: column; }
@keyframes flexStepIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.flex-enrol-step-header { margin: 0 48px 25px 0; }
.flex-enrol-step-header h3 { margin: 0 0 7px; color: #192542; font: 700 clamp(22px, 2.1vw, 29px)/1.2 'Outfit', sans-serif; outline: none; }
.flex-enrol-step-header p { margin: 0; color: #657687; font-size: 14px; line-height: 1.55; }

.flex-pack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.flex-pack-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-height: 174px; padding: 19px 17px 16px; overflow: hidden; text-align: left; border: 1.5px solid #dfe8ea; border-radius: 17px; color: #192542; background: #fff; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.flex-pack-card:hover { border-color: #87cfc3; transform: translateY(-2px); box-shadow: 0 10px 25px rgba(25,37,66,.08); }
.flex-pack-card.is-selected { border-color: #00ad92; background: #f2fcfa; box-shadow: 0 0 0 3px rgba(0,173,146,.13); }
.flex-pack-card.is-popular { border-color: #f28a4b; }
.flex-pack-popular { position: absolute; top: 0; right: 0; padding: 5px 9px; border-radius: 0 15px 0 10px; color: #fff; background: #f47f3f; font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.flex-pack-card__top { display: flex; align-items: baseline; gap: 7px; padding-right: 5px; }
.flex-pack-card__top strong { font: 700 18px/1 'Outfit', sans-serif; }
.flex-pack-card__top span { color: #718190; font-size: 11px; font-weight: 650; }
.flex-pack-price { margin-top: 20px; font: 800 30px/1 'Outfit', sans-serif; }
.flex-pack-rate { margin-top: 5px; color: #657687; font-size: 12px; }
.flex-pack-flexible { margin-top: auto; padding: 4px 8px; border-radius: 999px; color: #7d4697; background: #f3eafa; font-size: 10px; font-weight: 700; }

.flex-enrol-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 18px; }
.flex-enrol-form-grid .form-group { display: block; margin: 0; }
.flex-enrol-form-grid .form-label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700; color: #34495e; }
.flex-enrol-form-grid .form-input, .flex-enrol-form-grid .form-select, .flex-enrol-form-grid .form-textarea { width: 100%; border-color: #d8e3e6; background: #fbfdfd; font-size: 14px; }
.flex-enrol-form-grid .form-input, .flex-enrol-form-grid .form-select { min-height: 45px; }
.flex-enrol-form-grid .form-textarea { resize: vertical; }
.flex-enrol-full { grid-column: 1 / -1; }

.flex-enrol-review { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.flex-enrol-review > div { padding: 15px 16px; border: 1px solid #e1eaec; border-radius: 13px; background: #f8fbfb; }
.flex-enrol-review > div:last-child { grid-column: 1 / -1; }
.flex-enrol-review span { display: block; margin-bottom: 5px; color: #7a8997; font-size: 10px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.flex-enrol-review strong { display: block; color: #192542; font-size: 13px; line-height: 1.45; }

.flex-enrol-payment-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin: 0 0 13px; padding: 0; border: 0; }
.flex-enrol-payment-methods legend { grid-column: 1 / -1; margin-bottom: 8px; color: #34495e; font-size: 12px; font-weight: 750; }
.flex-payment-option { position: relative; display: flex; align-items: center; gap: 11px; min-height: 66px; padding: 11px 13px; border: 1.5px solid #dce6e8; border-radius: 13px; background: #fff; cursor: pointer; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.flex-payment-option:has(input:checked) { border-color: #00ad92; background: #f2fcfa; box-shadow: 0 0 0 3px rgba(0,173,146,.1); }
.flex-payment-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.flex-payment-option input:focus-visible + span { outline: 2px solid #007f6c; outline-offset: 3px; }
.flex-payment-option__icon, .flex-payment-option__bizum { display: grid; flex: 0 0 36px; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #fff; background: #192542; }
.flex-payment-option__icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.flex-payment-option__bizum { background: #05a68b; font: 800 19px/1 'Outfit', sans-serif; }
.flex-payment-option strong, .flex-payment-option small { display: block; }
.flex-payment-option strong { color: #192542; font-size: 13px; }
.flex-payment-option small { margin-top: 3px; color: #718190; font-size: 10px; line-height: 1.3; }

.flex-enrol-payment { display: flex; gap: 13px; margin-bottom: 14px; padding: 15px; border: 1px solid #a7dfd6; border-radius: 14px; color: #165d53; background: #effbf9; }
.flex-enrol-payment svg { flex: 0 0 24px; width: 24px; fill: none; stroke: #00ad92; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.flex-enrol-payment strong { display: block; margin-bottom: 3px; color: #164d47; font-size: 13px; }
.flex-enrol-payment p { margin: 0; font-size: 12px; line-height: 1.5; }

.flex-enrol-terms { margin-bottom: 15px; border: 1px solid #e1e9eb; border-radius: 12px; background: #fff; }
.flex-enrol-terms summary { padding: 12px 14px; color: #34495e; font-size: 12px; font-weight: 750; cursor: pointer; }
.flex-enrol-terms ul { margin: 0; padding: 0 30px 14px 34px; color: #657687; font-size: 11px; line-height: 1.5; }
.flex-enrol-terms li + li { margin-top: 6px; }
.flex-enrol-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 9px; color: #445667; font-size: 12px; line-height: 1.45; cursor: pointer; }
.flex-enrol-check input { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 1px; accent-color: #00ad92; }
.flex-enrol-check a { color: #008b75; text-decoration: underline; }
.flex-enrol-payment-obligation { margin: 12px 0 0; color: #192542; font-size: 11px; font-weight: 750; line-height: 1.4; text-align: right; }

.flex-enrol-error { min-height: 18px; margin: 10px 0 0; color: #c53c3c; font-size: 12px; font-weight: 600; }
.flex-enrol-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; }
.flex-enrol-actions--end { justify-content: flex-end; }
.flex-enrol-actions .btn { min-width: 130px; }
.flex-enrol-honey { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

.flex-enrol-success { align-items: center; justify-content: center; max-width: 520px; margin: auto; text-align: center; }
.flex-enrol-success-icon { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 22px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #00ad92, #25c9ae); box-shadow: 0 14px 30px rgba(0,173,146,.25); }
.flex-enrol-success-icon svg { width: 34px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.flex-enrol-success h3 { margin: 0 0 9px; color: #192542; font: 700 30px/1.2 'Outfit', sans-serif; }
.flex-enrol-success > p { margin: 0 0 18px; color: #657687; }
.flex-enrol-success-note { margin-bottom: 25px; padding: 15px 18px; border-radius: 13px; color: #165d53; background: #effbf9; font-size: 13px; line-height: 1.55; }

@media (max-width: 820px) {
  .flex-enrol-overlay { padding: 12px; }
  .flex-enrol-modal { display: block; height: min(780px, calc(100svh - 24px)); border-radius: 22px; }
  .flex-enrol-aside { display: block; padding: 24px 58px 20px 24px; }
  .flex-enrol-aside h2 { font-size: 25px; }
  .flex-enrol-aside > p, .flex-enrol-aside-note { display: none; }
  .flex-enrol-eyebrow { margin-bottom: 9px; }
  .flex-enrol-progress { display: flex; gap: 13px; margin: 18px 0 0; }
  .flex-enrol-progress li { gap: 6px; font-size: 11px; }
  .flex-enrol-progress li:not(:last-child)::after { display: none; }
  .flex-enrol-progress span { width: 24px; height: 24px; }
  .flex-enrol-main { height: calc(100% - 158px); padding: 26px 24px 24px; }
  .flex-enrol-step-header { margin-right: 35px; }
}

@media (max-width: 600px) {
  .flex-enrol-overlay { padding: 0; }
  .flex-enrol-modal { height: 100svh; max-height: none; border-radius: 0; }
  .flex-enrol-aside { padding: 18px 52px 14px 18px; }
  .flex-enrol-aside h2 { font-size: 21px; }
  .flex-enrol-eyebrow { padding: 4px 8px; font-size: 9px; }
  .flex-enrol-progress { margin-top: 12px; }
  .flex-enrol-progress li { font-size: 10px; }
  .flex-enrol-main { height: calc(100% - 133px); padding: 22px 17px 18px; }
  .flex-enrol-step-header { margin-bottom: 18px; }
  .flex-enrol-step-header h3 { font-size: 22px; }
  .flex-pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .flex-pack-card { min-height: 135px; padding: 15px 13px 12px; }
  .flex-pack-card__top strong { font-size: 16px; }
  .flex-pack-card__top span { font-size: 10px; }
  .flex-pack-price { margin-top: 14px; font-size: 25px; }
  .flex-pack-popular { font-size: 7px; }
  .flex-enrol-form-grid { grid-template-columns: 1fr; gap: 13px; }
  .flex-enrol-full { grid-column: auto; }
  .flex-enrol-review { grid-template-columns: 1fr; }
  .flex-enrol-review > div:last-child { grid-column: auto; }
  .flex-enrol-payment-methods { grid-template-columns: 1fr; }
  .flex-enrol-actions { position: sticky; bottom: -18px; margin: auto -17px -18px; padding: 13px 17px calc(13px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); box-shadow: 0 -8px 20px rgba(25,37,66,.07); }
  .flex-enrol-actions .btn { min-width: 0; padding-inline: 10px; font-size: 12px; }
  .flex-enrol-actions [data-flex-back] { flex: 0 0 112px; }
  .flex-enrol-actions [data-flex-submit], .flex-enrol-actions [data-flex-next] { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .flex-enrol-overlay, .flex-enrol-modal, .flex-enrol-step, .flex-pack-card { transition: none; animation: none; }
}
