/* ==============================================
   7 Ayda 7 Güzel Adam - Basvuru Formu Stilleri
   Ottoman Burgundy Tema Uyumlu
   ============================================== */

/* --- Form Hero --- */
.form-hero {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  padding: 100px 0 60px;
  text-align: center;
}

.form-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 12px;
}

.form-hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

.form-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--accent-secondary);
  margin-bottom: 32px;
  transition: color 0.3s ease;
}

.form-back-link:hover {
  color: var(--text-primary);
}

/* --- Step Indicator --- */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 600px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(var(--accent-primary-rgb), 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-primary);
  transition: border-color 0.4s ease, background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
  flex-shrink: 0;
}

.step-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.4s ease;
  white-space: nowrap;
}

.step-line {
  flex: 1;
  height: 2px;
  background: rgba(var(--accent-primary-rgb), 0.12);
  margin: 0 12px;
  min-width: 24px;
  position: relative;
  overflow: hidden;
}

.step-line::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--accent-primary);
  transition: width 0.4s ease;
}

/* Step states */
.step-item.active .step-circle {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  color: var(--btn-text, var(--text-primary));
  box-shadow: 0 0 16px rgba(var(--accent-primary-rgb), 0.4);
}

.step-item.active .step-label {
  color: var(--accent-secondary);
}

.step-item.completed .step-circle {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  color: var(--btn-text, var(--text-primary));
}

.step-item.completed .step-label {
  color: var(--text-secondary);
}

.step-line.completed::after {
  width: 100%;
}

/* --- Form Container --- */
.form-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* --- Form Steps --- */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: formFadeIn 0.4s ease;
}

@keyframes formFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-title {
  font-size: 22px;
  color: var(--accent-secondary);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 100%;
}

/* --- Form Groups --- */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group label .required {
  color: var(--accent-primary);
  margin-left: 2px;
}

.form-group label .optional {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

/* --- Inputs --- */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.15);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.15);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A89080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-select option {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}

/* --- Radio Groups --- */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-option {
  position: relative;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-option .radio-label {
  display: inline-block;
  padding: 8px 18px;
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.15);
  border-radius: 50px;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
}

.radio-option .radio-label:hover {
  border-color: rgba(var(--accent-primary-rgb), 0.35);
  color: var(--text-primary);
}

.radio-option input[type="radio"]:checked + .radio-label {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--btn-text, var(--text-primary));
  box-shadow: 0 0 12px rgba(var(--accent-primary-rgb), 0.3);
}

.radio-option input[type="radio"]:focus-visible + .radio-label {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

/* --- Scale Input (1-5) --- */
.scale-group {
  display: flex;
  align-items: center;
  gap: 0;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.scale-option {
  position: relative;
  flex: 1;
}

.scale-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.scale-option .scale-label {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.12);
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
}

.scale-option:first-child .scale-label {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.scale-option:last-child .scale-label {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.scale-option .scale-label:hover {
  background: rgba(var(--accent-primary-rgb), 0.1);
  color: var(--text-primary);
}

.scale-option input[type="radio"]:checked + .scale-label {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--btn-text, var(--text-primary));
  box-shadow: 0 0 12px rgba(var(--accent-primary-rgb), 0.3);
  z-index: 1;
  position: relative;
}

.scale-option input[type="radio"]:focus-visible + .scale-label {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

/* --- Checkbox --- */
.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-option .checkbox-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.checkbox-option .checkbox-text a {
  color: var(--accent-secondary);
  text-decoration: underline;
}

/* --- Validation --- */
.form-group.error .form-input,
.form-group.error .form-select,
.form-group.error .form-textarea {
  border-color: #D32F2F;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
}

.form-group.error .radio-group,
.form-group.error .scale-group {
  padding: 4px;
  border-radius: var(--radius-sm);
  outline: 1px solid rgba(211, 47, 47, 0.5);
  outline-offset: 4px;
}

.form-error {
  display: none;
  font-size: 12px;
  color: #EF5350;
  margin-top: 6px;
}

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

/* --- Navigation Buttons --- */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  gap: 16px;
}

.btn-prev {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid rgba(var(--text-primary-rgb), 0.15);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.btn-prev:hover {
  border-color: var(--accent-secondary);
  color: var(--text-primary);
}

.btn-next,
.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--btn-text, var(--text-primary));
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark));
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  margin-left: auto;
}

.btn-next:hover,
.btn-submit:hover {
  background: linear-gradient(135deg, var(--accent-primary-dark), var(--accent-primary));
  box-shadow: 0 4px 20px rgba(var(--accent-primary-rgb), 0.4);
  transform: translateY(-2px);
}

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

/* Hidden prev placeholder */
.nav-spacer {
  width: 1px;
}

/* --- Success Screen --- */
.form-success {
  display: none;
  text-align: center;
  padding: 60px 24px;
  animation: formFadeIn 0.5s ease;
}

.form-success.active {
  display: block;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: rgba(var(--accent-primary-rgb), 0.15);
  border: 2px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon svg {
  width: 40px;
  height: 40px;
  color: var(--accent-secondary);
}

.success-title {
  font-size: 28px;
  margin-bottom: 12px;
}

.success-text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 460px;
  margin: 0 auto 32px;
}

.success-home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* --- noscript fallback --- */
.noscript-form .form-step {
  display: block;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(var(--accent-primary-rgb), 0.15);
}

.noscript-form .form-step:last-of-type {
  border-bottom: none;
}

.noscript-form .step-indicator,
.noscript-form .form-nav {
  display: none;
}

.noscript-form .noscript-submit {
  display: block;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .form-hero {
    min-height: 220px;
    padding: 80px 0 40px;
  }

  .step-indicator {
    margin-bottom: 36px;
  }

  .step-label {
    display: none;
  }

  .step-line {
    min-width: 32px;
    margin: 0 8px;
  }

  .form-container {
    padding: 0 16px 60px;
  }

  .step-title {
    font-size: 20px;
  }

  .radio-group {
    gap: 8px;
  }

  .radio-option .radio-label {
    padding: 8px 14px;
    font-size: 13px;
  }

  .scale-option .scale-label {
    height: 40px;
    font-size: 14px;
  }

  .form-nav {
    margin-top: 32px;
  }

  .btn-prev,
  .btn-next,
  .btn-submit {
    padding: 12px 20px;
  }
}

@media (max-width: 480px) {
  .form-hero {
    padding: 70px 0 32px;
  }

  .step-circle {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .form-group {
    margin-bottom: 20px;
  }

  .form-input,
  .form-select,
  .form-textarea {
    padding: 10px 14px;
    font-size: 14px;
  }

  .radio-option .radio-label {
    padding: 7px 12px;
    font-size: 13px;
  }

  .success-title {
    font-size: 24px;
  }

  .form-hero-subtitle { font-size: 14px; }
  .form-back-link { font-size: 13px; margin-bottom: 24px; }
}

@media (max-width: 360px) {
  .form-hero-title {
    font-size: 1.5rem;
  }

  .scale-option .scale-label {
    height: 36px;
    font-size: 13px;
  }

  .form-container { padding: 0 12px 48px; }
  .step-desc { font-size: 13px; margin-bottom: 24px; }
  .btn-prev { padding: 10px 16px; font-size: 13px; }
  .btn-next, .btn-submit { padding: 10px 20px; font-size: 14px; }
}
