/* Registration flow — matches marketing site tokens from main.css */

.registration-page.section {
  padding-top: 1rem;
  padding-bottom: 4rem;
  background-color: var(--background-color);
  color: var(--default-color);
}

.registration-shell {
  max-width: 920px;
}

.registration-password-note {
  margin: 0.75rem 0 1.5rem;
  color: color-mix(in srgb, var(--default-color), transparent 15%);
  font-size: 0.95rem;
  max-width: 42rem;
}

.registration-alert {
  background: color-mix(in srgb, #dc3545, transparent 90%);
  border: 1px solid color-mix(in srgb, #dc3545, transparent 70%);
  color: #842029;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.25rem;
}

.registration-alert.is-success {
  background: color-mix(in srgb, #198754, transparent 90%);
  border-color: color-mix(in srgb, #198754, transparent 70%);
  color: #0f5132;
}

.registration-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.progress-step {
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 85%);
  color: var(--default-color);
  border-radius: 0.65rem;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.progress-step:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.progress-step.is-active,
.progress-step.is-done {
  color: var(--heading-color);
  border-color: color-mix(in srgb, var(--heading-color), transparent 55%);
}

.progress-step.is-active {
  box-shadow: inset 0 0 0 1px var(--heading-color);
}

.progress-index {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--heading-color), transparent 92%);
  color: var(--heading-color);
  font-size: 0.85rem;
  font-weight: 700;
}

.progress-step.is-active .progress-index,
.progress-step.is-done .progress-index {
  background: var(--heading-color);
  color: var(--contrast-color);
}

.progress-label {
  font-size: 0.75rem;
  font-family: var(--nav-font);
}

.registration-form {
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.registration-form legend {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--heading-color);
  margin-bottom: 1rem;
  float: none;
  width: auto;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.registration-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--default-color);
}

.registration-form label.full {
  margin-top: 1rem;
}

.registration-form label small {
  color: color-mix(in srgb, var(--default-color), transparent 25%);
}

.registration-form input.is-invalid,
.registration-form select.is-invalid,
.registration-form textarea.is-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.15);
}

.registration-form .field-error {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #dc3545;
  font-weight: 500;
}

.registration-form .field-error:empty {
  display: none;
}

.registration-form input,
.registration-form select,
.registration-form textarea {
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 80%);
  color: var(--heading-color);
  border-radius: 0.5rem;
  padding: 0.7rem 0.85rem;
  font-family: var(--default-font);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  width: 100%;
  padding-inline-end: 2.75rem;
}

.password-toggle {
  position: absolute;
  inset-inline-end: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--default-color);
  padding: 0.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--heading-color);
}

.registration-form input[readonly] {
  background: #f9f9f9;
}

.registration-form input:focus,
.registration-form select:focus,
.registration-form textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--heading-color), transparent 70%);
  outline-offset: 1px;
  border-color: var(--heading-color);
}

.billing-toggle {
  display: inline-flex;
  margin: 1.5rem 0 1rem;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 80%);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.billing-btn {
  background: transparent;
  color: var(--default-color);
  border: 0;
  padding: 0.55rem 1.1rem;
  font-family: var(--nav-font);
  font-weight: 600;
}

.billing-btn.is-active {
  background: var(--heading-color);
  color: var(--contrast-color);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.plan-card {
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 85%);
  border-radius: 0.85rem;
  padding: 1rem;
  background: #fff;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.plan-card:hover {
  border-color: color-mix(in srgb, var(--heading-color), transparent 50%);
}

.plan-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-card:has(input:checked) {
  border-color: var(--heading-color);
  box-shadow: 0 0 0 1px var(--heading-color);
}

.plan-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.plan-card strong {
  color: var(--heading-color);
  font-family: var(--heading-font);
}

.plan-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--heading-color);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.media-card {
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
  border-radius: 0.9rem;
  background: #fff;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.media-card-head strong {
  color: var(--heading-color);
  font-family: var(--heading-font);
  margin-inline-end: 0.5rem;
}

.media-card-head p {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--default-color), transparent 15%);
}

.media-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.media-badge.is-required {
  background: color-mix(in srgb, var(--heading-color), transparent 90%);
  color: var(--heading-color);
}

.media-badge.is-optional {
  background: #f3f3f3;
  color: var(--default-color);
}

.media-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  border: 1.5px dashed color-mix(in srgb, var(--default-color), transparent 70%);
  border-radius: 0.75rem;
  background: #fafafa;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.media-dropzone:hover,
.media-dropzone.is-dragging {
  border-color: var(--heading-color);
  background: color-mix(in srgb, var(--heading-color), transparent 96%);
}

.media-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  padding: 0;
  border: 0;
}

.media-dropzone-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem;
  text-align: center;
  pointer-events: none;
}

.media-dropzone-empty .bi {
  font-size: 1.75rem;
  color: var(--heading-color);
}

.media-drop-title {
  color: var(--heading-color);
  font-weight: 600;
  font-size: 0.95rem;
}

.media-drop-hint {
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  font-size: 0.8rem;
}

.media-preview {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}

.media-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.media-status {
  position: absolute;
  inset-inline-start: 0.75rem;
  bottom: 0.75rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.media-card.has-file .media-status {
  background: #198754;
}

.media-card.is-uploading .media-status {
  background: var(--heading-color);
}

.media-replace-btn {
  align-self: flex-start;
  border: 1px solid color-mix(in srgb, var(--heading-color), transparent 70%);
  background: transparent;
  color: var(--heading-color);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.media-replace-btn:hover {
  background: var(--heading-color);
  color: #fff;
}

.media-card.has-file .media-dropzone {
  border-style: solid;
  border-color: color-mix(in srgb, var(--heading-color), transparent 55%);
  padding: 0;
  min-height: 0;
}

.option-panel {
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, #fff 0%, #fbfbfb 100%);
  margin: 1.25rem 0 0;
  padding: 1.15rem 1.05rem 1.2rem;
}

.option-panel > legend {
  float: none;
  width: auto;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--heading-font);
  color: var(--heading-color);
  margin: 0;
  padding: 0;
}

.option-panel-hint {
  margin: 0.4rem 0 1rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--default-color), transparent 18%);
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.option-tile {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  cursor: pointer;
  user-select: none;
}

.option-tile input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  clip: rect(0 0 0 0);
}

.option-tile-face {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  min-height: 5.75rem;
  height: 100%;
  padding: 0.95rem 0.85rem 0.9rem;
  border: 1.5px solid color-mix(in srgb, var(--default-color), transparent 84%);
  border-radius: 0.85rem;
  background: #fff;
  color: var(--default-color);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.option-tile:hover .option-tile-face {
  border-color: color-mix(in srgb, var(--heading-color), transparent 50%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.option-tile input:focus-visible + .option-tile-face {
  outline: 2px solid color-mix(in srgb, var(--heading-color), transparent 30%);
  outline-offset: 2px;
}

.option-tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--heading-color), transparent 92%);
  font-size: 1.1rem;
  color: var(--heading-color);
  line-height: 1;
}

.option-tile-label {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--heading-color);
  padding-inline-end: 1.4rem;
}

.option-tile-check {
  position: absolute;
  top: 0.6rem;
  inset-inline-end: 0.6rem;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1.5px solid color-mix(in srgb, var(--default-color), transparent 75%);
  background: #fff;
  color: transparent;
  font-size: 0.78rem;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.option-tile input:checked + .option-tile-face {
  border-color: var(--heading-color);
  background: color-mix(in srgb, var(--heading-color), transparent 95%);
  box-shadow:
    inset 0 0 0 1px var(--heading-color),
    0 8px 18px color-mix(in srgb, var(--heading-color), transparent 88%);
}

.option-tile input:checked + .option-tile-face .option-tile-icon {
  background: var(--heading-color);
  color: #fff;
}

.option-tile input:checked + .option-tile-face .option-tile-check {
  border-color: var(--heading-color);
  background: var(--heading-color);
  color: #fff;
  transform: scale(1.06);
}

.option-tile input:checked + .option-tile-face .option-tile-label {
  color: var(--heading-color);
}

.review-box {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px dashed color-mix(in srgb, var(--default-color), transparent 70%);
  border-radius: 0.75rem;
  background: #f9f9f9;
}

.review-box h2 {
  font-size: 1.15rem;
  color: var(--heading-color);
  margin-bottom: 0.5rem;
}

.confirm-row {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 0.65rem !important;
  margin-top: 0.75rem;
}

.registration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.registration-actions .btn-primary,
.registration-actions .btn-secondary,
.registration-actions .btn-ghost,
.success-card .btn-primary {
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  font-weight: 600;
  border: 1px solid transparent;
  font-family: var(--nav-font);
}

.registration-actions .btn-primary,
.success-card .btn-primary {
  background: var(--heading-color);
  color: var(--contrast-color);
}

.registration-actions .btn-primary:hover,
.success-card .btn-primary:hover {
  background: color-mix(in srgb, var(--heading-color), #fff 12%);
}

.registration-actions .btn-secondary {
  background: transparent;
  color: var(--heading-color);
  border-color: color-mix(in srgb, var(--heading-color), transparent 70%);
}

.registration-actions .btn-ghost {
  background: transparent;
  color: var(--default-color);
  border-color: transparent;
}

.registration-actions .btn-primary:disabled,
.registration-actions .btn-secondary:disabled,
.registration-actions .btn-ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.success-card {
  max-width: 560px;
  margin: 0 auto 3rem;
  text-align: center;
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
  border-radius: 1rem;
  padding: 2.5rem 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.success-card h1 {
  color: var(--heading-color);
  font-family: var(--heading-font);
  margin-bottom: 0.75rem;
}

.success-card .btn-primary {
  display: inline-block;
  margin-top: 1.5rem;
  text-decoration: none;
}

@media (max-width: 991px) {
  .option-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .field-grid,
  .registration-progress,
  .media-grid {
    grid-template-columns: 1fr;
  }

  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .option-tile-face {
    min-height: 5.25rem;
  }

  .registration-actions {
    justify-content: stretch;
  }

  .registration-actions button {
    flex: 1 1 100%;
  }
}

@media (max-width: 420px) {
  .option-grid {
    grid-template-columns: 1fr;
  }
}
