/* ==========================================================================
   Register — role switch + course picker (premium)
   ========================================================================== */

.auth-register-extras {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.auth-role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  padding: 4px;
  border-radius: var(--radius-full);
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.auth-role-switch__btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-3) var(--space-4);
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.auth-role-switch__btn small {
  font-size: var(--text-xs);
  font-weight: 500;
  opacity: 0.85;
}

.auth-role-switch__btn:hover {
  color: var(--color-primary-dark);
}

.auth-role-switch__btn.is-active {
  color: var(--color-primary-dark);
  background: #fff;
  box-shadow:
    0 2px 8px rgba(5, 150, 105, 0.12),
    0 1px 2px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.auth-role-switch__btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.auth-course-field {
  display: grid;
  gap: var(--space-2);
  overflow: hidden;
  max-height: 280px;
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease,
    transform 0.28s ease,
    margin 0.28s ease;
}

.auth-course-field.is-hidden {
  max-height: 0;
  opacity: 0;
  margin-top: calc(var(--space-5) * -1);
  transform: translate3d(0, -8px, 0);
  pointer-events: none;
}

.auth-course-field__label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
}

.auth-course-field__hint {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.auth-course-select .form-field {
  margin: 0;
}

.auth-course-select select.form-input {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  padding-right: 2.75rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 1.15rem;
}

.auth-course-select select.form-input option {
  font-weight: 500;
  padding: 0.5rem;
}

.auth-parent-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.9), rgba(255, 251, 235, 0.65));
  border: 1px solid rgba(5, 150, 105, 0.18);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-height: 120px;
  opacity: 1;
  transition:
    max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease,
    margin 0.28s ease;
}

.auth-parent-note.is-hidden {
  max-height: 0;
  opacity: 0;
  margin-top: calc(var(--space-5) * -1);
  padding-block: 0;
  border-width: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-parent-note svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  margin-top: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .auth-course-field,
  .auth-parent-note,
  .auth-role-switch__btn,
  .auth-gender-switch__btn {
    transition: none;
  }

  .auth-course-field.is-hidden,
  .auth-parent-note.is-hidden {
    display: none;
  }
}

/* Gender selector — premium avatar cards */
.auth-gender-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.auth-gender-switch__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.auth-gender-switch__btn small {
  font-size: var(--text-xs);
  font-weight: 500;
  opacity: 0.85;
}

.auth-gender-switch__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(241, 245, 249, 0.95), rgba(236, 253, 245, 0.85));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.auth-gender-switch__icon img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.auth-gender-switch__btn:hover {
  transform: translateY(-1px);
  border-color: rgba(5, 150, 105, 0.28);
  color: var(--color-primary-dark);
}

.auth-gender-switch__btn--male.is-active {
  border-color: rgba(37, 99, 235, 0.35);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.95), #fff);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
  color: #1D4ED8;
}

.auth-gender-switch__btn--female.is-active {
  border-color: rgba(219, 39, 119, 0.32);
  background: linear-gradient(180deg, rgba(255, 241, 242, 0.95), #fff);
  box-shadow: 0 8px 24px rgba(219, 39, 119, 0.12);
  color: #BE185D;
}

.auth-gender-switch__btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
