/* Signup flow — extends auth-login.css portal theme */

body.signup-page.setup-flow {
  align-items: center;
  justify-content: flex-start;
  padding: 32px 16px 48px;
}

.setup-wrapper.login-shell.signup-shell--wide {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
  animation: loginFadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.signup-shell--wide .auth-brand {
  margin-bottom: 0;
  width: 100%;
}

/* Role selection */
.role-card__heading {
  margin: 0 0 18px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-black);
  display: flex;
  align-items: center;
  gap: 10px;
}

.role-card__heading i {
  color: var(--color-primary);
}

.role-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.role-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  transition: border-color 0.25s, background 0.25s, transform 0.2s, box-shadow 0.25s;
  animation: signupCardIn 0.5s ease backwards;
}

.role-option:nth-child(1) { animation-delay: 0.12s; }
.role-option:nth-child(2) { animation-delay: 0.2s; }

@keyframes signupCardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.role-option:hover {
  border-color: #93c5fd;
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

.role-option.selected {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  box-shadow: 0 8px 24px rgba(11, 117, 200, 0.18);
  transform: translateY(-2px);
}

.role-option__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  background: #e2e8f0;
  color: #475569;
  transition: background 0.25s, color 0.25s;
}

.role-option[data-role="athlete-coach"] .role-option__icon {
  background: #dbeafe;
  color: #1d4ed8;
}

.role-option[data-role="trainee-parent"] .role-option__icon {
  background: #dcfce7;
  color: #166534;
}

.role-option.selected .role-option__icon {
  background: var(--color-primary);
  color: #fff;
}

.role-option__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.role-option__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.role-option__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.role-option__desc {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
}

.role-option__check {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
}

.role-option__check i {
  font-size: 0.75rem;
  color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s, transform 0.2s;
}

.role-option.selected .role-option__check {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: scale(1.05);
}

.role-option.selected .role-option__check i {
  opacity: 1;
  transform: scale(1);
}

.role-option__arrow {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-left: 4px;
  transition: color 0.2s, transform 0.2s;
}

.role-option:hover .role-option__arrow,
.role-option.selected .role-option__arrow {
  color: var(--color-primary);
  transform: translateX(3px);
}

.setup-heading__title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: #f8fafc !important;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.setup-heading__title i {
  color: #60a5fa;
}

.setup-heading__subtitle {
  color: #94a3b8 !important;
  margin-top: 8px;
}

.setup-heading {
  width: 100%;
  text-align: center;
  animation: signupCardIn 0.55s ease both;
}

.setup-card {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: signupCardIn 0.6s ease 0.1s both;
}

.setup-card__header {
  background: linear-gradient(135deg, #08162a 0%, #1e3463 100%);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.setup-card__step-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
}

.setup-card__step-label i {
  opacity: 0.85;
}

.setup-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.setup-progress__pill {
  height: 6px;
  width: 56px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.25);
  transition: width 0.35s ease, background 0.35s, opacity 0.35s;
}

.setup-progress__pill.active {
  width: 72px;
  background: var(--color-primary);
}

.setup-progress__pill.done {
  background: var(--color-primary);
  opacity: 0.6;
}

.setup-card__body {
  padding: 32px 28px 36px;
}

.setup-step {
  display: none;
  animation: setupStepIn 0.4s ease;
}

.setup-step.active {
  display: block;
}

@keyframes setupStepIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  cursor: pointer;
  width: 100%;
}

.avatar-upload__circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-primary);
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #1e3463, #0b75c8);
  box-shadow: 0 12px 28px rgba(11, 117, 200, 0.35);
  transition: transform 0.25s, box-shadow 0.25s;
}

.avatar-upload__circle img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.avatar-upload__circle img.visible {
  display: block;
}

.avatar-upload__hint {
  font-size: 14px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.signup-page #avatarInput {
  display: none;
}

.setup-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.setup-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
  width: 100%;
}

.setup-actions--split {
  justify-content: space-between;
  flex-wrap: wrap;
}

.setup-actions .btn-primary {
  width: 100%;
  max-width: 280px;
  padding: 14px 32px;
  border: none;
  color: #fff;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 600;
}

.setup-actions--split .btn-primary {
  width: auto;
  flex: 1;
  min-width: 160px;
  max-width: none;
}

.setup-actions--split .btn-ghost {
  padding: 14px 28px;
  background: transparent;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 600;
}

.avatar-upload:hover .avatar-upload__circle {
  transform: scale(1.04);
  box-shadow: 0 16px 36px rgba(11, 117, 200, 0.4);
}

.signup-page .form-field__textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 120px;
  padding: 16px 14px;
  border-radius: 12px;
  font-family: var(--font-primary);
  font-size: 14px;
  resize: vertical;
}

.signup-page .form-field__input,
.signup-page .form-field__textarea {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.signup-page .form-field__input:focus,
.signup-page .form-field__textarea:focus {
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: var(--shadow-input-focus);
}

.signup-page .login-field__control .form-field__input {
  padding-left: 42px;
}

.signup-page .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #08162a 0%, #0b75c8 100%);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(8, 22, 42, 0.25);
  transition: transform 0.2s, box-shadow 0.25s;
}

.signup-page .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(11, 117, 200, 0.35);
}

.signup-page .btn-primary:disabled {
  opacity: 0.8;
  cursor: wait;
}

.signup-page .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 14px;
}

.signup-page .btn-ghost:hover {
  background: #eff6ff;
  color: var(--color-primary);
}

.setup-actions .btn-primary .btn-spinner,
.signup-page .auth-btn .btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: loginSpin 0.7s linear infinite;
}

.setup-actions .btn-primary.is-loading .btn-spinner,
.signup-page .auth-btn.is-loading .btn-spinner {
  display: inline-block;
}

@media (max-width: 480px) {
  .role-option {
    padding: 14px 16px;
  }

  .role-option__icon {
    width: 38px;
    height: 38px;
  }

  .setup-heading__title {
    font-size: 1.4rem;
  }

  .setup-card__body {
    padding: 24px 18px 28px;
  }

  .setup-card__header {
    flex-wrap: wrap;
    padding: 14px 18px;
  }

  .setup-progress__pill {
    width: 40px;
  }

  .setup-progress__pill.active {
    width: 56px;
  }

  .setup-actions--split {
    flex-direction: column-reverse;
  }

  .setup-actions--split .btn-primary,
  .setup-actions--split .btn-ghost {
    width: 100%;
    max-width: none;
  }
}
