/* ==========================================================================
   wizard.css – registration wizard (steps 0–4) on the mp design system.
   Only --mp-* tokens; animations only under [data-motion] (mp.css turns
   everything off for prefers-reduced-motion).
   ========================================================================== */

.mp-wizard { max-width: 1080px; }
.mp-wiz-panel { padding: clamp(20px, 4.5vw, 36px); display: flex; flex-direction: column; gap: 20px; }
.mp-wiz-panel > .mp-title { margin-bottom: 0; }
.mp-wiz-form { display: flex; flex-direction: column; gap: 20px; }
.mp-wiz-disclaimer { max-width: 760px; }
.mp-wiz-panel .mp-check { max-width: 760px; }
.mp-wiz-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 16px; }
.mp-wiz-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 8px; }
.mp-wiz-actions--split { flex-direction: row-reverse; justify-content: space-between; }
.mp-wiz-bank { display: flex; flex-direction: column; gap: 14px; }
.mp-wiz-bank__legend { font-size: 15px; }
.mp-saved { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--mp-ok-fg); }

/* ── Step indicator ────────────────────────────────────────────────────── */
.mp-steps { margin: 0 0 28px; }
.mp-steps__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mp-steps__item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.mp-steps__link { display: flex; flex-direction: column; align-items: center; gap: 8px; color: inherit; text-decoration: none; min-width: 44px; border-radius: var(--mp-radius); }
.mp-steps__link:hover .mp-steps__label { text-decoration: underline; text-underline-offset: 3px; }
.mp-steps__line { position: absolute; top: 18px; left: 50%; width: 100%; height: 4px; background: var(--mp-line); z-index: 0; }
.mp-steps__line > span { display: block; height: 100%; width: 0; background: var(--mp-primary); }
.mp-steps__item.is-done .mp-steps__line > span { width: 100%; }
.mp-steps__dot {
    position: relative; z-index: 1; width: 40px; height: 40px; box-sizing: border-box; border-radius: 50%;
    display: grid; place-items: center; font-weight: 800; font-variant-numeric: tabular-nums;
    background: var(--mp-card); color: var(--mp-muted); border: 2px solid var(--mp-line);
    box-shadow: 0 0 0 6px var(--mp-paper); transition: background-color .4s, color .4s, transform .4s;
}
.mp-steps__item.is-done .mp-steps__dot,
.mp-steps__item.is-current .mp-steps__dot { background: var(--mp-primary); color: var(--mp-on-primary); border-color: var(--mp-primary); }
.mp-steps__item.is-current .mp-steps__dot { transform: scale(1.12); }
.mp-steps__label { font-size: 14px; font-weight: 800; color: var(--mp-muted); overflow-wrap: anywhere; }
.mp-steps__item.is-current .mp-steps__label { color: var(--mp-text); }
[data-motion="full"] .mp-steps__item.is-last-done .mp-steps__line > span,
[data-motion="calm"] .mp-steps__item.is-last-done .mp-steps__line > span { animation: mp-grow .7s var(--mp-ease) .1s both; }
[data-motion="full"] .mp-steps__item.is-current .mp-steps__dot { animation: mp-pop .45s cubic-bezier(.2,1.4,.4,1) .45s both; }
@media (max-width: 480px) {
    .mp-steps__label { font-size: 12px; }
    .mp-steps__dot { width: 36px; height: 36px; }
    .mp-steps__line { top: 16px; }
}

/* ── Athlete cards ─────────────────────────────────────────────────────── */
.mp-athletes { display: flex; flex-direction: column; gap: 16px; }
.mp-athlete { padding: clamp(16px, 3vw, 22px) clamp(16px, 3vw, 24px); display: flex; flex-direction: column; gap: 16px; }
.mp-athlete.has-errors { border-color: var(--mp-bad-line); }
.mp-athlete.has-import-notes { border-color: var(--mp-warn-line); }
.mp-athlete__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mp-athlete__num { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--mp-text); color: var(--mp-card); font-size: 20px; }
.mp-athlete__title { flex: 1 1 160px; min-width: 0; margin: 0; font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.mp-athlete__name { color: var(--mp-muted); font-weight: 700; }
.mp-athlete__fee { font-size: 28px; color: var(--mp-primary-text); white-space: nowrap; }
.mp-athlete__fee:empty { display: none; }
.mp-athlete__grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.mp-athlete__row { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-start; }
.mp-athlete__ac { flex: 1 1 240px; }
.mp-athlete__weights { min-height: 44px; }
.card-notes:empty { display: none; }
[data-motion="full"] .mp-athlete.is-new { animation: mp-fade-up .5s var(--mp-ease) both; }
.mp-wiz-add { margin-top: 16px; }

/* ── Import drop zone ──────────────────────────────────────────────────── */
.mp-import { border: 2px dashed var(--mp-line); display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: center; transition: border-color .2s, background-color .2s; }
.mp-import.is-dragover { border-color: var(--mp-secondary-text); background: var(--mp-secondary-tint); }
.mp-import__icon { width: 52px; height: 52px; border-radius: var(--mp-radius); display: grid; place-items: center; flex-shrink: 0; background: var(--mp-secondary-tint); color: var(--mp-secondary-text); }
.mp-import__text { flex: 1 1 260px; min-width: 0; }
.mp-import__title { margin: 0 0 2px; font-size: 17px; font-weight: 800; }
.mp-import__text .mp-help { margin: 0; font-size: 14px; }
.mp-import__text a { color: var(--mp-secondary-text); font-weight: 800; }
.mp-import__controls { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.mp-import__file { flex: 1 1 260px; }
.mp-import__more { flex: 1 1 100%; font-size: 14px; }
.mp-import__more > summary { cursor: pointer; font-weight: 700; color: var(--mp-secondary-text); min-height: 32px; }
.mp-import__more .mp-help { margin: 6px 0 0; }
.mp-import__result { flex: 1 1 100%; }
.mp-import__result:empty { display: none; }
[data-motion="full"] .mp-import__result .mp-alert { animation: mp-drop .4s var(--mp-ease) both; }

/* ── Sticky total bar ──────────────────────────────────────────────────── */
.mp-totalbar {
    position: sticky; bottom: 8px; z-index: 20; margin-top: 24px;
    background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: var(--mp-radius-lg); box-shadow: 0 -16px 30px -24px rgba(11,19,36,.55);
}
@supports (backdrop-filter: blur(10px)) {
    .mp-totalbar { background: color-mix(in srgb, var(--mp-card) 90%, transparent); backdrop-filter: blur(10px); }
}
.mp-totalbar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px clamp(12px, 3vw, 20px); }
.mp-totalbar__stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; min-width: 0; }
.mp-totalbar__count { font-weight: 800; }
.mp-totalbar__sum { color: var(--mp-muted); }
.mp-totalbar__sum strong { font-size: 30px; color: var(--mp-text); margin-left: 4px; }
.mp-totalbar__hints { color: var(--mp-bad-fg); font-weight: 800; font-size: 14px; }
.mp-totalbar__actions { display: flex; flex-direction: row-reverse; flex-wrap: wrap; gap: 10px; }
@media (max-width: 560px) {
    .mp-totalbar__actions { width: 100%; }
    .mp-totalbar__actions .mp-btn { flex: 1 1 0; padding: 0 12px; }
    .mp-totalbar__sum strong { font-size: 24px; }
}

/* ── Summary (step 3) ──────────────────────────────────────────────────── */
.mp-summary { display: flex; flex-direction: column; gap: 18px; }
.mp-summary .mp-card { padding: clamp(18px, 3.5vw, 26px) clamp(16px, 3.5vw, 28px); }
.mp-summary .mp-card--flush { padding: 0 0 8px; }
.mp-summary__contact { display: grid; gap: 10px 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); color: var(--mp-muted); }
.mp-summary__contact strong { color: var(--mp-text); }
.mp-summary__total { display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between; align-items: center; }
.mp-summary__total-label { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mp-muted); }
.mp-summary__total-value { font-size: clamp(44px, 8vw, 56px); color: var(--mp-primary-text); line-height: 1; }
.mp-summary__total-right { text-align: right; margin-left: auto; }
.mp-summary__total > .mp-muted { flex: 1 1 280px; }
.mp-summary .mp-table-wrap { margin-inline: -4px; }

/* ── Success (step 4) ──────────────────────────────────────────────────── */
.mp-success { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: clamp(32px, 7vw, 56px) clamp(18px, 4vw, 36px); overflow: hidden; }
.mp-success__mark { position: relative; width: 110px; height: 110px; }
.mp-success__ring, .mp-success__pop { position: absolute; inset: 0; border-radius: 50%; background: var(--mp-primary); }
.mp-success__ring { opacity: 0; }
.mp-success__pop { display: grid; place-items: center; color: var(--mp-on-primary); }
.mp-success__check path { stroke-dasharray: 60; stroke-dashoffset: 0; }
.mp-success__title { font-size: clamp(40px, 8vw, 56px); margin: 8px 0 0; }
.mp-success__text { margin: 0; max-width: 560px; color: var(--mp-muted); line-height: 1.6; }
.mp-success__text strong { color: var(--mp-text); }
.mp-success__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
[data-motion="full"] .mp-success__ring { animation: mp-ring 1.4s ease-out .1s both; }
[data-motion="full"] .mp-success__pop { animation: mp-pop .45s cubic-bezier(.2,1.4,.4,1) both; }
[data-motion="full"] .mp-success__check path { stroke-dashoffset: 60; animation: mp-draw .6s .3s ease-out forwards; }
[data-motion="full"] .mp-success__seq { animation: mp-fade-up .6s var(--mp-ease) both; animation-delay: var(--mp-delay, .2s); }
[data-motion="calm"] .mp-success__pop { animation: mp-fade-up .4s ease-out both; }
@media (prefers-reduced-motion: reduce) {
    .mp-success__check path { stroke-dashoffset: 0 !important; }
}
