/* Apply Page Styles */
/* Inherits core design system from styles.css */

.apply-container {
  min-height: 100vh;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.5),
    rgba(247, 247, 245, 0.8)
  );
}

/* Header */
.apply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px clamp(20px, 5vw, 60px);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(17, 18, 20, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.apply-logo a {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.3s ease;
}

.apply-logo a:hover {
  color: var(--accent);
}

.apply-status {
  font-size: 13px;
  color: rgba(17, 18, 20, 0.5);
}

/* Progress Bar */
.progress-container {
  padding: 32px clamp(20px, 5vw, 60px) 0;
  max-width: 800px;
  margin: 0 auto;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(17, 18, 20, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--champagne));
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  width: 0%;
}

.progress-label {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(17, 18, 20, 0.6);
}

/* Main Content */
.apply-main {
  padding: 40px clamp(20px, 5vw, 60px) 80px;
  max-width: 800px;
  margin: 0 auto;
}

/* Steps */
.apply-step {
  display: none;
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.apply-step.active {
  display: block;
}

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

.step-content {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(17, 18, 20, 0.08);
  border-radius: 24px;
  padding: clamp(32px, 5vw, 60px);
  backdrop-filter: blur(20px);
  box-shadow: 
    0 8px 32px rgba(18, 20, 24, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.step-header {
  text-align: center;
  margin-bottom: 48px;
}

.step-header h1,
.step-header h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--ink);
  line-height: 1.2;
}

.step-description {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(17, 18, 20, 0.7);
  max-width: 600px;
  margin: 0 auto;
}

/* Form */
.apply-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.form-field {
  margin-bottom: 24px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="url"],
.form-field textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(17, 18, 20, 0.12);
  border-radius: 12px;
  font-size: 16px;
  font-family: var(--sans);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 153, 104, 0.1);
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-field small {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: rgba(17, 18, 20, 0.5);
}

.form-field input[type="file"] {
  padding: 12px;
}

/* Question Blocks */
.question-block {
  margin-bottom: 40px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(17, 18, 20, 0.06);
  border-radius: 16px;
}

.question-label {
  display: block;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}

/* Radio Options */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-option {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(17, 18, 20, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.radio-option:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 1);
}

.radio-option input[type="radio"] {
  margin-right: 14px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent);
}

.radio-option input[type="radio"]:checked + span {
  font-weight: 600;
  color: var(--accent);
}

.radio-option span {
  flex: 1;
  font-size: 16px;
  color: var(--ink);
}

/* Scale Input */
.scale-group {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
}

.scale-group label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(17, 18, 20, 0.6);
  margin: 0;
}

.scale-input {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(17, 18, 20, 0.1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.scale-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.scale-input::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.scale-value {
  min-width: 24px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

/* OTP */
.otp-form {
  text-align: center;
}

.otp-inputs {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}

.otp-digit {
  width: 56px;
  height: 64px;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  border: 2px solid rgba(17, 18, 20, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}

.otp-digit:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 153, 104, 0.1);
}

.otp-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.text-button {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.text-button:hover {
  color: var(--champagne);
}

.text-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Step Actions */
.step-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 48px;
}

.primary-button,
.secondary-button {
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--sans);
  border: none;
  text-decoration: none;
  display: inline-block;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(200, 153, 104, 0.3);
}

.primary-button:hover {
  background: var(--champagne);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 153, 104, 0.4);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  border: 1px solid rgba(17, 18, 20, 0.12);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 1);
  border-color: var(--accent);
}

/* Success Screen */
.success-content {
  text-align: center;
  padding: 80px 40px;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
}

.success-icon svg {
  width: 48px;
  height: 48px;
}

.success-content h2 {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--ink);
}

.success-content p {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(17, 18, 20, 0.7);
  max-width: 500px;
  margin: 0 auto 40px;
}

/* Mobile Responsive */
@media (max-width: 720px) {
  .apply-header {
    padding: 16px 20px;
  }

  .apply-logo a {
    font-size: 20px;
  }

  .progress-container {
    padding: 24px 20px 0;
  }

  .apply-main {
    padding: 32px 20px 60px;
  }

  .step-content {
    padding: 24px;
  }

  .step-header {
    margin-bottom: 32px;
  }

  .step-header h1,
  .step-header h2 {
    font-size: 28px;
  }

  .step-description {
    font-size: 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .question-block {
    padding: 24px;
    margin-bottom: 28px;
  }

  .question-label {
    font-size: 16px;
  }

  .radio-option {
    padding: 14px 16px;
  }

  .otp-digit {
    width: 48px;
    height: 56px;
    font-size: 24px;
  }

  .otp-inputs {
    gap: 8px;
  }

  .step-actions {
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
    padding: 14px 32px;
  }

  .success-content {
    padding: 60px 24px;
  }

  .success-content h2 {
    font-size: 28px;
  }
}
