/* =========================================================
   Application Form (apply.html) — scoped styles
   Reuses CSS vars defined in style.css (--blue, --pink, --yellow,
   --dark, --gray, --radius, --shadow, --transition)
   ========================================================= */

.apply-section {
  padding: 60px 0 100px;
  background: var(--light-bg);
  min-height: 70vh;
}

.apply-intro .apply-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.5px;
}

.apply-intro .apply-subtitle {
  font-size: 16px;
  color: var(--gray);
  max-width: 520px;
  margin: 12px auto 0;
}

/* ── Step Indicator ── */
.apply-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.apply-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.45;
  transition: var(--transition);
}

.apply-step-item.active,
.apply-step-item.completed {
  opacity: 1;
}

.apply-step-item.clickable {
  cursor: pointer;
}

.apply-step-item:not(.clickable) {
  cursor: not-allowed;
}

.apply-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
}

.apply-step-item.completed .apply-step-num {
  background: var(--pink);
}

.apply-step-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
}

.apply-step-divider {
  width: 40px;
  height: 2px;
  background: rgba(0, 115, 204, 0.2);
}

/* ── Card ── */
.apply-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
}

.apply-panel-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 25px;
}

.apply-fieldset-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 14px;
}

.apply-field {
  margin-bottom: 20px;
}

.apply-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.apply-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--dark);
  background: var(--white);
  transition: var(--transition);
}

.apply-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 115, 204, 0.12);
}

.apply-input:invalid.apply-touched,
.apply-input.apply-invalid {
  border-color: #e04848;
}

/* ── Smaller fields inside the child repeater ── */
.apply-field-sm {
  margin-bottom: 14px;
}

.apply-field-sm label {
  font-size: 13px;
  margin-bottom: 4px;
}

.apply-field-sm .apply-input {
  padding: 9px 12px;
  font-size: 14px;
}

/* ── Child Repeater ── */
.apply-repeater-hint {
  font-size: 13px;
  color: var(--gray);
  margin: -6px 0 16px;
}

.child-card {
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  overflow: hidden;
  transition: var(--transition);
}

.child-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--light-bg);
  cursor: pointer;
}

.child-card-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  flex: 1;
  text-align: left;
}

.child-card-chevron {
  font-size: 14px;
  color: var(--blue);
  transition: var(--transition);
}

.child-card.expanded .child-card-chevron {
  transform: rotate(180deg);
}

.child-remove-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #e04848;
  transition: var(--transition);
}

.child-remove-btn:hover:not(:disabled) {
  background: rgba(224, 72, 72, 0.1);
}

.child-remove-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.child-card-body {
  display: none;
  padding: 18px 16px 4px;
}

.child-card.expanded .child-card-body {
  display: block;
}

.apply-add-child-actions {
  justify-content: flex-start;
  margin-top: 0;
  margin-bottom: 25px;
}

.apply-error-msg {
  display: none;
  color: #e04848;
  font-size: 14px;
  font-weight: 600;
  margin-top: 10px;
}

.apply-error-msg.visible {
  display: block;
}

/* ── Buttons ── */
.apply-actions {
  margin-top: 30px;
  display: flex;
  justify-content: flex-end;
}

.apply-actions-split {
  justify-content: space-between;
}

.btn-secondary-camp-outline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--dark);
  font-size: 15px;
  font-weight: 700;
  padding: 13px 30px;
  border-radius: 50px;
  border: 1.5px solid #e2e8f0;
  transition: var(--transition);
}

.btn-secondary-camp-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ── Step 2: Payment Summary ── */
.apply-summary-box {
  background: var(--light-bg);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-bottom: 20px;
}

.apply-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 15px;
  color: var(--dark);
}

.apply-summary-row + .apply-summary-row {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.apply-summary-row.apply-summary-total {
  font-size: 17px;
  font-weight: 800;
  color: var(--blue);
}

.apply-note {
  font-size: 14px;
  color: var(--gray);
}

/* ── Step 3: Review ── */
.apply-review-box {
  background: var(--light-bg);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-bottom: 10px;
}

.apply-review-group {
  margin-bottom: 16px;
}

.apply-review-group:last-child {
  margin-bottom: 0;
}

.apply-review-group h5 {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}

.apply-review-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--dark);
  padding: 4px 0;
  gap: 12px;
}

.apply-review-row span:first-child {
  color: var(--gray);
}

.apply-review-row span:last-child {
  font-weight: 600;
  text-align: right;
}

.apply-payment-status {
  font-size: 14px;
  font-weight: 600;
  margin-top: 14px;
  min-height: 20px;
}

.apply-payment-status.success {
  color: #1c9d5f;
}

.apply-payment-status.cancelled {
  color: #e0a548;
}

@media (max-width: 767px) {
  .apply-card {
    padding: 28px 20px;
  }

  .apply-step-label {
    display: none;
  }

  .apply-step-divider {
    width: 20px;
  }
}
