/* PENDAFTARAN PAGE */
.pendaftaran {
  min-height: 50vh;
  padding: clamp(80px, 10vh, 120px) 16px clamp(48px, 8vw, 64px);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pendaftaran__container {
  max-width: 600px;
  width: 100%;
  background: var(--bg-light);
  border-radius: 16px;
  padding: clamp(32px, 6vw, 48px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-muted);
}

.pendaftaran__header {
  text-align: center;
  margin-bottom: clamp(32px, 6vw, 40px);
}

.pendaftaran__title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.2;
  color: var(--text);
}

.pendaftaran__subtitle {
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  color: var(--text-muted);
  line-height: 1.5;
}

.pendaftaran__form {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 4vw, 24px);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.form-label--required::after {
  content: " *";
  color: var(--danger);
}

.form-input,
.form-select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 2px solid var(--border-muted);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  font-family: inherit;
  transition: all 150ms ease;
  box-sizing: border-box;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(118, 74, 188, 0.1);
}

.form-input:hover,
.form-select:hover {
  border-color: var(--border);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 44px;
}

.form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.form-error {
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  color: var(--danger);
  margin-top: 4px;
  display: none;
}

.form-group.error .form-input,
.form-group.error .form-select {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group.error .form-error {
  display: block;
}

.form-submit {
  margin-top: clamp(16px, 3vw, 24px);
  height: 52px;
  background: var(--primary);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 150ms ease;
  letter-spacing: 0.02em;
}

.form-submit:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(118, 74, 188, 0.3);
}

.form-submit:active {
  transform: translateY(0);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-info {
  margin-top: clamp(20px, 4vw, 24px);
  padding: 16px;
  background: var(--bg-dark);
  border-radius: 8px;
  border-left: 4px solid var(--info);
}

.form-info__text {
  font-size: clamp(0.85rem, 2vw, 0.9rem);
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Success state */
.pendaftaran__success {
  display: none;
  text-align: center;
  padding: clamp(32px, 6vw, 40px);
}

.pendaftaran__success.show {
  display: block;
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--bg);
}

.success-title {
  font-size: clamp(1.5rem, 3.5vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.success-message {
  font-size: clamp(0.9rem, 2.2vw, 1rem);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.success-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .pendaftaran {
    padding: 80px 16px 48px;
  }

  .pendaftaran__container {
    padding: 24px;
    border-radius: 12px;
  }

  .form-input,
  .form-select {
    height: 44px;
    padding: 0 12px;
  }

  .form-select {
    padding-right: 40px;
    background-size: 18px;
    background-position: right 10px center;
  }

  .form-submit {
    height: 48px;
  }

  .success-actions {
    flex-direction: column;
    align-items: center;
  }

  .success-actions .btn {
    width: 100%;
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .pendaftaran {
    padding: 70px 12px 32px;
  }

  .pendaftaran__container {
    padding: 20px;
    border-radius: 8px;
  }

  .form-input,
  .form-select {
    height: 42px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .form-submit {
    height: 46px;
  }

  .success-icon {
    width: 56px;
    height: 56px;
    font-size: 1.75rem;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .form-input,
  .form-select {
    border-width: 2px;
  }

  .form-input:focus,
  .form-select:focus {
    box-shadow: 0 0 0 4px rgba(118, 74, 188, 0.2);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .form-input,
  .form-select,
  .form-submit {
    transition: none;
  }

  .form-submit:hover {
    transform: none;
  }
}
