/*
 * The public registration page: three steps, one at a time (all at once when
 * scripts are off), large touch targets, the review before sending.
 */

.pub-wizard { max-width: 860px; margin-inline: auto; }
.pub-hero, .pub-steps, .pub-main > .alert, .pub-main > .ac-note { max-width: 860px; margin-inline: auto; }
.pub-hero { text-align: center; margin-bottom: 22px; }
.pub-hero h1 { font-size: 26px; }

/* the trap for bots: out of sight, out of the tab order */
.pub-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* steps */
.pub-steps { display: flex; list-style: none; padding: 0; margin-top: 0; margin-bottom: 18px; gap: 0; counter-reset: step; }
.pub-steps li { flex: 1; display: flex; align-items: center; padding: 0; }
.pub-steps li::before { display: none; }
.pub-steps li::after { content: ""; flex: 1; height: 2px; background: #DDE3DF; margin-inline: 10px; }
.pub-steps li:last-child { flex: 0 0 auto; }
.pub-steps li:last-child::after { display: none; }
.pub-steps button { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px; color: var(--ac-muted); font-weight: 600; font-size: 14px; border-radius: 10px; white-space: nowrap; }
.pub-steps button:not(:disabled) { cursor: pointer; }
.pub-steps button:not(:disabled):hover { color: var(--ac-ink); }
.pub-steps button::before { counter-increment: step; content: counter(step); flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 2px solid #C9D0DD; color: var(--ac-muted); font-weight: 700; }
.pub-steps li.is-current button { color: var(--ac-ink); }
.pub-steps li.is-current button::before { border-color: var(--ac-navy); background: var(--ac-navy); color: #fff; box-shadow: 0 0 0 4px rgba(22, 105, 56, .15); }
.pub-steps li.is-done button::before { content: "✓"; border-color: var(--ac-navy); color: var(--ac-navy); background: #EFF6F1; }
.pub-steps li.is-done::after { background: var(--ac-navy); }
@media (max-width: 575px) { .pub-steps button span { display: none; } .pub-steps li.is-current button span { display: inline; } }
html:not(.pub-js) .pub-steps, html:not(.pub-js) .pub-nav [data-next] { display: none; }

/* each step: one card and its buttons */
.pub-card { background: #fff; border: 1px solid var(--ac-line); border-radius: 18px; padding: 24px 26px; box-shadow: 0 1px 2px rgba(24, 33, 61, .04); }
.pub-card h2 { font-size: 19px; display: flex; align-items: center; gap: 10px; margin: 0 0 18px; }
.pub-num { width: 30px; height: 30px; border-radius: 9px; background: #EFF6F1; color: var(--ac-navy); font-size: 15px; display: inline-flex; align-items: center; justify-content: center; }
.pub-sub { font-size: 15px; margin: 24px 0 6px; }
.pub-hint { color: var(--ac-muted); font-size: 13.5px; margin: 0 0 12px; }
@media (max-width: 575px) { .pub-card { padding: 18px 16px; border-radius: 14px; } }

.pub-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 16px 0 28px; }
.pub-nav .btn-lg { min-height: 50px; border-radius: 12px; padding-inline: 22px; font-size: 16px; font-weight: 600; }
[dir="ltr"] .pub-dir { display: inline-block; transform: scaleX(-1); }

/* courses as cards */
.pub-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pub-course { position: relative; display: flex; flex-direction: column; gap: 3px; border: 1.5px solid var(--ac-line); border-radius: 14px; padding: 14px 16px; background: #fff; cursor: pointer; margin: 0; transition: border-color .12s, box-shadow .12s; }
.pub-course:hover { border-color: #AEB6C6; }
.pub-course input { position: absolute; opacity: 0; pointer-events: none; }
.pub-course__check { position: absolute; top: 12px; inset-inline-end: 12px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #C9D0DD; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; }
.pub-course__check .mdi { opacity: 0; }
.pub-course:has(input:checked) { border-color: var(--ac-navy); box-shadow: 0 0 0 3px rgba(22, 105, 56, .14); background: #FAFCFB; }
.pub-course:has(input:checked) .pub-course__check { background: var(--ac-navy); border-color: var(--ac-navy); }
.pub-course:has(input:checked) .pub-course__check .mdi { opacity: 1; }
.pub-course:has(input:focus-visible) { outline: 2px solid var(--ac-blue); outline-offset: 2px; }
.pub-course__date { font-weight: 700; color: var(--ac-ink); font-size: 15px; padding-inline-end: 28px; }
.pub-course__meta { font-size: 12.5px; color: var(--ac-muted); }
.pub-course__meta .mdi { font-size: 14px; }
.pub-course__seats { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: #146C4E; }
.pub-course__seats.is-few { color: #8A5A0B; }
.pub-course--wait { background: var(--ac-soft); border-style: dashed; }

/* groups of fields */
.pub-group { border: 0; border-top: 1px solid var(--ac-line); padding: 18px 0 4px; margin: 0; }
.pub-group:first-of-type { border-top: 0; padding-top: 4px; }
.pub-group legend { float: none; width: auto; font-size: 14.5px; font-weight: 700; color: var(--ac-navy); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.pub-group legend .mdi { font-size: 19px; }
.pub-wizard .form-control, .pub-wizard .form-select { min-height: 48px; font-size: 15.5px; border-radius: 11px; }

/* the review */
.pub-review { display: grid; gap: 14px; margin-bottom: 18px; }
.pub-review__block { border: 1px solid var(--ac-line); border-radius: 14px; overflow: hidden; }
.pub-review__head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--ac-soft); border-bottom: 1px solid var(--ac-line); }
.pub-review__head strong { color: var(--ac-ink); }
.pub-review dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pub-review dl > div { padding: 10px 16px; border-bottom: 1px solid var(--ac-line); }
.pub-review dt { font-size: 12px; color: var(--ac-muted); font-weight: 600; }
.pub-review dd { margin: 2px 0 0; color: var(--ac-ink); font-weight: 600; word-break: break-word; }
.pub-confirm { background: #FBF6EA; border: 1px solid #EEDDB5; border-radius: 12px; padding: 14px 16px 14px 44px; }
[dir="rtl"] .pub-confirm { padding: 14px 44px 14px 16px; }
.pub-confirm .form-check-input { width: 1.3em; height: 1.3em; }
