/* Phoenix JKD Institute — Registration & Waiver Form */

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: #0a0a0a; }
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: #eaeaea;
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: #DE2A29; text-decoration: none; }

/* Layout */
.app {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0;
    position: relative;
}

/* Hero */
.hero {
    background: #0a0a0a;
    padding: 32px 24px 24px;
    border-bottom: 1px solid #1a1a1a;
    position: relative;
}
.hero h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
    margin-bottom: 6px;
}
.hero .tagline {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #f5b301;
    margin-bottom: 14px;
    line-height: 1.5;
}
.hero .intro {
    font-size: 14px;
    color: #b8b8b8;
    line-height: 1.6;
}

/* Progress bar */
.progress-wrap {
    background: #0a0a0a;
    padding: 16px 24px;
    border-bottom: 1px solid #1a1a1a;
}
.progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.progress-step-label {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}
.progress-title {
    font-size: 13px;
    font-weight: 500;
    color: #999;
    text-align: right;
}
.progress-bars {
    display: flex;
    gap: 6px;
}
.progress-bar {
    flex: 1;
    height: 5px;
    background: #2a2a2a;
    border-radius: 0;
    overflow: hidden;
    transition: background 0.3s;
}
.progress-bar.done,
.progress-bar.active { background: #DE2A29; }

/* Card */
.card {
    background: #fff;
    color: #1a1a1a;
    border-radius: 0;
    padding: 24px 20px;
    margin: 20px 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.card + .card { margin-top: 16px; }
.card-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #DE2A29;
    margin-bottom: 6px;
}
.card-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #0a0a0a;
    margin-bottom: 12px;
    line-height: 1.15;
}
.card-title-sm { font-size: 18px; }
.card-lede {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}
.card-lede-tight { margin-bottom: 16px; }

/* Fields */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.field-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 480px) {
    .field-row,
    .field-row.cols-3 { grid-template-columns: 1fr; gap: 0; }
    .field-row .field { margin-bottom: 18px; }
}
label,
.field-legend {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}
label .req, .field-legend .req { color: #DE2A29; }

::placeholder {
    color: #888;
    opacity: 1;
}
input::placeholder,
textarea::placeholder {
    color: #888;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    font-size: 16px;
    font-family: inherit;
    color: #1a1a1a;
    background: #fafafa;
    border: 1.5px solid #e5e5e5;
    border-radius: 0;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
    line-height: normal;
}
textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-family: inherit;
    color: #1a1a1a;
    background: #fafafa;
    border: 1.5px solid #e5e5e5;
    border-radius: 0;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}
select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'><path fill='%23666' d='M6 7L0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #DE2A29;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(222,42,41,0.08);
}
input.invalid, select.invalid, textarea.invalid {
    border-color: #DE2A29;
    background: #fff5f5;
}
/* Auto-populated / locked fields (not the DOB picker, which is picker-driven) */
input[readonly]:not(#date_of_birth) {
    background: #f0f0f0;
    color: #555;
    cursor: not-allowed;
}
input[readonly]:not(#date_of_birth):focus {
    border-color: #e5e5e5;
    background: #f0f0f0;
    box-shadow: none;
}
/* DOB picker input should still look normal + clickable */
#date_of_birth { cursor: pointer; }
textarea { min-height: 80px; resize: vertical; }
.hint {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}
.err {
    font-size: 12px;
    color: #DE2A29;
    margin-top: 6px;
    font-weight: 600;
    display: none;
}
.err.show { display: block; }

/* Checkbox / Radio groups */
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.options.inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}
.opt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fafafa;
    border: 1.5px solid #e5e5e5;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 15px;
    font-weight: 500;
}
.opt:hover { border-color: #ccc; background: #f4f4f4; }
.opt input {
    width: 22px; height: 22px;
    accent-color: #DE2A29;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}
.opt.checked {
    border-color: #DE2A29;
    background: #fff5f5;
    color: #1a1a1a;
}
.options.inline .opt { flex: 1 1 auto; min-width: 140px; }

/* Two-column option grid (used for consent radios etc.) */
.options.cols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
@media (max-width: 480px) {
    .options.cols-2 { grid-template-columns: 1fr; }
}

/* Plan table */
.plans { display: flex; flex-direction: column; gap: 10px; }
.plan {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #fafafa;
    border: 1.5px solid #e5e5e5;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.15s;
}
.plan input { width: 22px; height: 22px; accent-color: #DE2A29; flex-shrink: 0; margin: 0; }
.plan-body { flex: 1; min-width: 0; }
.plan-name { font-size: 15px; font-weight: 700; color: #0a0a0a; }
.plan-sub { font-size: 12px; color: #888; margin-top: 2px; }
.plan-price {
    font-size: 18px;
    font-weight: 800;
    color: #DE2A29;
    white-space: nowrap;
}
.plan-price .per { font-size: 11px; font-weight: 500; color: #888; }
.plan.checked { border-color: #DE2A29; background: #fff5f5; }

/* Legal text blocks */
.legal {
    font-size: 13px;
    line-height: 1.65;
    color: #333;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 0;
    padding: 18px;
    margin-bottom: 16px;
}
.legal-tall { }
.legal h4 {
    font-size: 14px;
    font-weight: 800;
    color: #0a0a0a;
    margin: 14px 0 6px;
}
.legal h4:first-child { margin-top: 0; }
.legal p { margin-bottom: 10px; }
.legal .warn {
    font-weight: 700;
    color: #0a0a0a;
    background: #fff5f5;
    padding: 10px 12px;
    border-radius: 0;
    border-left: 3px solid #DE2A29;
}
.legal ol, .legal ul { padding-left: 20px; margin-bottom: 10px; }
.legal li { margin-bottom: 8px; }

/* Signature pad */
.sig-wrap {
    background: #fafafa;
    border: 2px dashed #d0d0d0;
    border-radius: 0;
    padding: 8px;
    position: relative;
}
.sig-canvas {
    display: block;
    width: 100%;
    height: 180px;
    background: #fff;
    border-radius: 0;
    touch-action: none;
    cursor: crosshair;
}
.sig-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4px 0;
}
.sig-controls .hint { font-size: 12px; color: #888; margin: 0; }
.sig-clear {
    background: none;
    border: none;
    color: #DE2A29;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
}
.sig-clear:hover { text-decoration: underline; }

/* Review */
.review-block { margin-bottom: 20px; }
.review-block h3 {
    font-size: 14px;
    font-weight: 700;
    color: #DE2A29;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}
.review-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    font-size: 14px;
    padding: 6px 0;
}
@media (max-width: 480px) {
    .review-row { grid-template-columns: 1fr; gap: 2px; padding: 8px 0; }
}
.review-row .k { color: #888; font-weight: 600; }
.review-row .v { color: #1a1a1a; word-break: break-word; }
.review-row .v.empty { color: #bbb; font-style: italic; }
.review-sig {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 0;
    padding: 8px;
    margin-top: 8px;
}
.review-sig img { display: block; max-width: 100%; height: auto; }
.review-sub-label {
    font-size: 12px;
    color: #888;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 6px;
}

/* Nav footer — sits at natural end of form, scrolls with page.
   Side padding matches the card margins (16px) so the button's right edge
   lines up exactly with the last card's right edge. Top margin is 0
   because the previous card already provides its 20px bottom margin. */
.navbar {
    padding: 0 16px 20px;
    display: flex;
    gap: 10px;
}
.navbar .inner {
    width: 100%;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.navbar .btn-primary,
.navbar .btn-ghost {
    flex: 0 0 auto;
    min-width: 300px;
}
@media (max-width: 480px) {
    .navbar .inner { justify-content: center; }
    .navbar .btn-primary,
    .navbar .btn-ghost {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
    }
}
.btn {
    flex: 1;
    padding: 16px 20px;
    border-radius: 0;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    letter-spacing: 0.3px;
}
.btn-primary {
    background: #DE2A29;
    color: #fff;
    box-shadow: 0 4px 14px rgba(222,42,41,0.35);
}
.btn-primary:hover:not(:disabled):not(.is-disabled) { background: #c02420; transform: translateY(-1px); }
.btn-primary:disabled,
.btn-primary.is-disabled {
    background: #555;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}
.btn-ghost {
    background: transparent;
    color: #eaeaea;
    border: 1.5px solid #333;
    flex: 0 0 auto;
    padding: 16px 22px;
}
.btn-ghost:hover { background: #1a1a1a; border-color: #444; }
.btn-inline { display: inline-block; text-decoration: none; max-width: 200px; margin: 0 auto; }

/* Steps */
.step { display: none; }
.step.active { display: block; animation: fade .25s ease-out; }
@keyframes fade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Submitting / Done overlays */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,10,10,0.96);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
}
.overlay.show { display: flex; }
.overlay-box { max-width: 460px; }
.spinner {
    width: 56px; height: 56px;
    border: 4px solid #333;
    border-top-color: #DE2A29;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.overlay h2 {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
}
.overlay h2.err-title { color: #DE2A29; }
.overlay p {
    font-size: 15px;
    color: #b8b8b8;
}
.check-icon {
    width: 72px; height: 72px;
    background: #DE2A29;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #fff;
    font-weight: bold;
}
.overlay-actions { margin-top: 24px; }

.staff-link {
    text-align: center;
    padding: 20px;
    font-size: 12px;
}
.staff-link a { color: #666; text-decoration: underline; }

/* Conditional (minor) sections */
.minor-only { display: none; }
body.is-minor .minor-only { display: block; }

.cc-note {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 0;
    padding: 12px 14px;
    font-size: 13px;
    color: #5d4a00;
    margin-bottom: 18px;
    line-height: 1.5;
}
.cc-note strong { color: #3d2f00; }

/* Square Web Payments SDK card mount — Square renders its own bordered
   container inside, so we don't add another one around it. */
.sq-card-wrap {
    background: transparent;
    border: 0;
    padding: 0;
    line-height: 0; /* strip any inline-descender space below the iframe */
}
.sq-card-wrap iframe {
    width: 100% !important;
    display: block;
    vertical-align: top;
}
/* Tighten the vertical rhythm around the Square card mount field so it
   sits closer to the Billing date field below. */
#cc-card .field:has(#sq-card) {
    margin-bottom: 4px;
}

/* Plan summary block (right column beside Cardholder name on section 7).
   Boxed to match the input on the left, name left-aligned, rate right-aligned. */
.plan-summary {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafafa;
    border: 1.5px solid #e5e5e5;
    padding: 0 16px;
    line-height: 1.2;
    gap: 12px;
}
.plan-summary-name {
    font-size: 15px;
    font-weight: 700;
    color: #0a0a0a;
    text-align: left;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.plan-summary-rate {
    font-size: 18px;
    font-weight: 800;
    color: #DE2A29;
    text-align: right;
    flex: 0 0 auto;
}
.plan-summary-rate .per {
    font-size: 11px;
    font-weight: 500;
    color: #888;
    margin-left: 2px;
}
.plan-summary.empty .plan-summary-name { color: #888; font-weight: 500; }
.plan-summary.empty .plan-summary-rate { color: #bbb; }

.field-hidden { display: none; }

/* ---------- Choices.js LIGHT theme override (mirrors admin dark theme) ---------- */
.choices { margin-bottom: 0; }
.choices__inner {
    background: #fafafa;
    border: 1.5px solid #e5e5e5;
    border-radius: 0;
    padding: 0 16px;
    min-height: 52px;
    height: 52px;
    font-size: 16px;
    display: flex;
    align-items: center;
}
.choices__list--single { padding: 0; }
.choices[data-type*=select-one] .choices__inner { padding-bottom: 0; }
.choices__list--single .choices__item { color: #1a1a1a; }
.choices__placeholder { color: #888; opacity: 1; }
.choices[data-type*=select-one]:after {
    border-color: #666 transparent transparent transparent;
    right: 16px;
    margin-top: -2px;
}
.is-open .choices[data-type*=select-one]:after {
    border-color: transparent transparent #666 transparent;
    margin-top: -8px;
}
.choices__list--dropdown,
.choices__list[aria-expanded] {
    background: #fff;
    border: 1.5px solid #e5e5e5;
    border-radius: 0;
    margin-top: -1px;
    z-index: 60;
}
.choices__list--dropdown .choices__item,
.choices__list[aria-expanded] .choices__item {
    color: #1a1a1a !important;
    background: #fff !important;
    padding: 12px 16px;
    font-size: 15px;
}
.choices__list--dropdown .choices__item--selectable.is-highlighted,
.choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
    background: #fff5f5 !important;
    color: #1a1a1a !important;
}
.choices__list--dropdown .choices__item.is-selected,
.choices__list[aria-expanded] .choices__item.is-selected {
    background: #f4f4f4 !important;
    color: #DE2A29 !important;
}
.choices.is-focused .choices__inner,
.choices.is-open .choices__inner {
    border-color: #DE2A29;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(222,42,41,0.08);
}
.choices__list--dropdown .choices__item--selectable:after {
    display: none;
}

/* ---------- Flatpickr LIGHT theme override ---------- */
.flatpickr-calendar {
    background: #fff;
    border: 1.5px solid #e5e5e5;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    font-family: inherit;
}
.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after { border-bottom-color: #e5e5e5; }
.flatpickr-months .flatpickr-month {
    background: #fff;
    color: #1a1a1a;
    fill: #1a1a1a;
    height: 44px;
    padding-top: 4px;
}
.flatpickr-current-month {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    padding: 6px 0 0;
}
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    color: #1a1a1a;
    font-weight: 700;
    background: transparent;
}
.flatpickr-current-month .flatpickr-monthDropdown-months option {
    background: #fff;
    color: #1a1a1a;
}
.flatpickr-monthDropdown-months:hover { background: #f4f4f4 !important; }
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: #666;
    fill: #666;
    padding: 10px;
}
.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    color: #DE2A29;
    fill: #DE2A29;
}
.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg { fill: inherit; }
span.flatpickr-weekday {
    background: #fafafa;
    color: #888;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.flatpickr-days { border: none; }
.dayContainer { padding: 4px; }
.flatpickr-day {
    color: #1a1a1a;
    border-radius: 0;
    max-width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 14px;
    border: none;
}
.flatpickr-day:hover,
.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover {
    background: #fff5f5;
    border-color: transparent;
    color: #1a1a1a;
}
.flatpickr-day.today {
    border: 1.5px solid #DE2A29;
    background: transparent;
    color: #DE2A29;
    font-weight: 700;
}
.flatpickr-day.today:hover { background: #DE2A29; color: #fff; }
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #DE2A29;
    border-color: #DE2A29;
    color: #fff;
    font-weight: 700;
}
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: #ccc;
}
.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
    color: #ddd;
    background: transparent;
    cursor: not-allowed;
}
.numInputWrapper span { border: none; }
.numInputWrapper span.arrowUp:after { border-bottom-color: #666; }
.numInputWrapper span.arrowDown:after { border-top-color: #666; }
.numInputWrapper:hover { background: transparent; }
