/* Registration wizard — RTL tokens aligned with site.css */
.reg-shell {
  --reg-accent: var(--color-primary);
  --reg-accent-soft: var(--color-primary-tint);
  --reg-ink: var(--color-text);
  --reg-muted: var(--color-text-secondary);
  --reg-line: var(--color-border);
  --reg-surface: var(--color-surface);
  max-width: 45rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 7rem;
}

.reg-shell--auth {
  max-width: 28rem;
  padding-bottom: 2rem;
}

.reg-hero {
  text-align: center;
  margin-bottom: 1.75rem;
  padding: 1.5rem 1rem;
  border-radius: var(--radius-card);
  background:
    radial-gradient(ellipse at 20% 0%, var(--color-primary-tint-light), transparent 55%),
    linear-gradient(160deg, #fff 0%, var(--color-bg) 100%);
  border: 1px solid var(--reg-line);
}

.reg-brand {
  display: inline-block;
  margin: 0 0 0.5rem;
}

.reg-brand img {
  display: block;
  height: 52px;
  width: auto;
  margin: 0 auto;
}

.reg-hero h1 {
  margin: 0 0 0.5rem;
  font-size: 1.55rem;
  font-weight: 700;
}

.reg-lead {
  margin: 0;
  color: var(--reg-muted);
  font-size: 0.95rem;
}

.reg-steps {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
}

.reg-steps li {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: auto;
  height: auto;
  border: 0;
  background: transparent;
  color: var(--reg-muted);
}

.reg-steps__num {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: #ede9fe;
  color: #6b7280;
}

.reg-steps li.is-current .reg-steps__num,
.reg-steps li.is-done .reg-steps__num {
  background: var(--reg-accent);
  color: #fff;
}

.reg-steps__label {
  font-size: 0.625rem;
  text-align: center;
  color: #6b7280;
  line-height: 1.3;
}

.reg-card {
  background: var(--reg-surface);
  border: 1px solid var(--reg-line);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.reg-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.reg-card label,
.reg-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--reg-ink);
  margin-top: 0.5rem;
}

.reg-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.reg-card select,
.reg-card .taxonomy-ac__input,
.reg-card textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--reg-line);
  border-radius: 12px;
  font: inherit;
  font-size: 0.875rem;
  background: #fff;
  margin-top: 0.35rem;
}

.reg-card .taxonomy-ac__input {
  padding-left: 2.15rem;
  margin-top: 0.35rem;
}

.reg-card input:focus,
.reg-card select:focus,
.reg-card .taxonomy-ac__input:focus,
.reg-card textarea:focus {
  outline: 2px solid var(--color-primary-tint);
  border-color: var(--reg-accent);
}

.reg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-start;
  margin-top: 0.75rem;
}

.reg-footer-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 0.65rem;
  margin: 1rem -1.25rem -1.25rem;
  padding: 0.75rem 1.25rem;
  background: #fff;
  border-top: 1px solid var(--reg-line);
  z-index: 5;
}

.reg-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  background: var(--reg-accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 13px;
  border-radius: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-align: center;
}

.reg-btn-primary,
.reg-btn-success {
  flex: 2;
}

.reg-btn:hover {
  background: var(--color-primary-hover);
}

.reg-btn-block {
  width: 100%;
  margin-top: 0.75rem;
}

.reg-btn-success {
  background: #16a34a;
}

.reg-btn-success:hover {
  background: #15803d;
}

.reg-btn-ghost {
  flex: 1;
  background: transparent;
  color: var(--reg-ink);
  border: 1px solid var(--reg-line);
  font-weight: 600;
}

.reg-btn-ghost:hover {
  background: var(--color-bg);
}

.reg-gender {
  display: flex;
  gap: 10px;
  margin-top: 0.35rem;
}

.reg-gender-btn {
  flex: 1;
  position: relative;
  text-align: center;
  padding: 11px;
  border-radius: 12px;
  border: 1px solid var(--reg-line);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8125rem;
  background: #fff;
  margin-top: 0;
}

.reg-gender-btn input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.reg-gender-btn:has(input:checked) {
  border-color: var(--reg-accent);
  background: #f5f3ff;
  color: #5b21b6;
}

.reg-field-error {
  display: block;
  color: var(--color-error, #dc2626);
  font-size: 0.75rem;
  min-height: 0;
}

.reg-field-error:empty,
.reg-field-error[hidden] {
  display: none !important;
}

.reg-otp {
  letter-spacing: 0.25em;
  text-align: center;
}

.reg-banner {
  font-size: 0.75rem;
  color: var(--reg-muted);
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 0.5rem;
}

.reg-text-btn {
  appearance: none;
  background: none;
  border: none;
  color: var(--reg-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.reg-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.reg-stack-gap {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--reg-line);
}

.reg-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-control);
  margin-bottom: 1rem;
  font-size: 0.92rem;
}

.reg-alert-error {
  background: #FEF2F2;
  color: var(--color-error);
  border: 1px solid #FECACA;
}

.reg-alert-ok {
  background: #F0FDF4;
  color: var(--color-success);
  border: 1px solid #BBF7D0;
}

.reg-alert-warn {
  background: #FFFBEB;
  color: var(--color-warning);
  border: 1px solid #FDE68A;
}

.reg-review {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.reg-review div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--reg-line);
}

.reg-review dt {
  margin: 0;
  color: var(--reg-muted);
  font-size: 0.85rem;
}

.reg-review dd {
  margin: 0;
  font-weight: 600;
}

.reg-consent,
.reg-hint {
  color: var(--reg-muted);
  font-size: 0.6875rem;
  margin: 0.25rem 0 0;
}

.reg-foot {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--reg-muted);
  font-size: 0.9rem;
}

.reg-foot-sep {
  margin: 0 0.35rem;
  color: var(--reg-line);
}

.reg-link {
  color: var(--reg-accent);
  font-weight: 600;
  text-decoration: none;
}

.reg-link:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .reg-review div {
    grid-template-columns: 1fr;
  }
}

.reg-match-card {
  border: 1px solid var(--reg-accent);
  background: var(--reg-accent-soft);
  border-radius: var(--radius-card);
  padding: 1rem;
  margin: 0.5rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* display:flex above must not defeat the HTML hidden attribute */
.reg-match-card[hidden] {
  display: none !important;
}

.reg-match-title {
  margin: 0;
  font-weight: 700;
}

.reg-match-body {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.reg-match-body img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.reg-match-name {
  font-weight: 700;
}

.reg-match-sub {
  font-size: 0.85rem;
  color: var(--reg-muted);
}

.reg-clinic-block {
  border: 1px dashed var(--reg-line);
  border-radius: var(--radius-card);
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.reg-clinic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reg-link-btn {
  background: none;
  border: none;
  color: var(--reg-accent);
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 0;
  text-align: start;
  font: inherit;
}

.reg-hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.reg-hours-table td {
  padding: 0.35rem 0.25rem;
  border-bottom: 1px solid var(--reg-line);
}

.reg-hours-table input[type="time"] {
  width: 100%;
  padding: 0.3rem;
}

.reg-checkbox {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 400;
  font-size: 0.85rem;
}

.clinic-map {
  height: 220px;
  border-radius: var(--radius-control);
  border: 1px solid var(--reg-line);
  margin-top: 0.5rem;
}

.reg-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.reg-chip {
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--reg-accent);
}

.reg-chip input {
  display: none;
}

.reg-chip:has(input:checked) {
  background: var(--reg-accent);
  color: #fff;
}

.reg-photo-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin-top: 0.5rem;
}

.reg-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.reg-gallery-item {
  position: relative;
}

.reg-gallery-item img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-control);
}

.reg-gallery-remove {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  cursor: pointer;
}

.reg-review-group {
  margin-bottom: 1.25rem;
}

.reg-review-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.reg-review-group-head a {
  font-size: 0.85rem;
  color: var(--reg-accent);
  font-weight: 600;
}
