/* ===========================================================
   FAJEM & CO. — APPLY FORM STYLES
   Multi-step application form. Mobile-first.
   =========================================================== */

/* ---------- PROGRESS BAR ---------- */
.apply-progress {
  margin-bottom: 64px;
}
.apply-progress-track {
  width: 100%;
  height: 2px;
  background: rgba(244, 239, 230, 0.08);
  margin-bottom: 16px;
  overflow: hidden;
}
.apply-progress-bar {
  height: 100%;
  background: linear-gradient(to right, #c9a86a, #e8c889);
  transition: width 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.apply-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.apply-section-label {
  color: #c9a86a;
}
.apply-section-num {
  color: rgba(244, 239, 230, 0.45);
  font-weight: 400;
  letter-spacing: 0.18em;
}
.apply-q-count {
  color: rgba(244, 239, 230, 0.55);
}
.apply-q-of {
  color: rgba(244, 239, 230, 0.35);
  font-weight: 400;
}

/* ---------- BODY: question + input ---------- */
.apply-body {
  margin-bottom: 56px;
}
.apply-q-text {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 300;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #f4efe6;
  margin: 0 0 16px 0;
}
.apply-q-hint {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(244, 239, 230, 0.55);
  margin: 0 0 36px 0;
}
.apply-q-input {
  margin-top: 32px;
}

/* ---------- TEXT / EMAIL / TEL / TEXTAREA / SELECT INPUTS ---------- */
.apply-q-input input[type="text"],
.apply-q-input input[type="email"],
.apply-q-input input[type="tel"],
.apply-q-input textarea,
.apply-q-input select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(244, 239, 230, 0.18);
  padding: 12px 0 16px 0;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 300;
  font-size: 22px;
  color: #f4efe6;
  letter-spacing: -0.015em;
  outline: none;
  transition: border-color 0.3s ease;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  font-family: 'Fraunces', Georgia, serif;
}
.apply-q-input textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
  font-size: 19px;
}
.apply-q-input select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23c9a86a' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 12px 8px;
  padding-right: 24px;
  cursor: pointer;
}
.apply-q-input select option {
  background: #0a0b0e;
  color: #f4efe6;
}
.apply-q-input input::placeholder,
.apply-q-input textarea::placeholder {
  color: rgba(244, 239, 230, 0.28);
  font-style: italic;
}
.apply-q-input input:focus,
.apply-q-input textarea:focus,
.apply-q-input select:focus {
  border-bottom-color: #c9a86a;
}

@media (max-width: 560px) {
  .apply-q-input input[type="text"],
  .apply-q-input input[type="email"],
  .apply-q-input input[type="tel"],
  .apply-q-input select { font-size: 19px; }
  .apply-q-input textarea { font-size: 17px; }
}

/* ---------- RADIO BUTTONS ---------- */
.apply-radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.apply-radio {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  background: transparent;
  border: 1px solid rgba(244, 239, 230, 0.12);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.apply-radio:hover {
  border-color: rgba(232, 200, 137, 0.35);
}
.apply-radio.selected {
  border-color: #c9a86a;
  background: rgba(201, 168, 106, 0.06);
}
.apply-radio input[type="radio"] {
  position: absolute;
  left: -10000px;
  opacity: 0;
}
.apply-radio-marker {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(244, 239, 230, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.25s ease;
}
.apply-radio.selected .apply-radio-marker {
  border-color: #c9a86a;
}
.apply-radio-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c9a86a;
  transform: scale(0);
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.apply-radio.selected .apply-radio-dot {
  transform: scale(1);
}
.apply-radio-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(244, 239, 230, 0.85);
}
.apply-radio.selected .apply-radio-text {
  color: #f4efe6;
}

/* ---------- CHECKBOXES ---------- */
.apply-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.apply-checkbox {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  background: transparent;
  border: 1px solid rgba(244, 239, 230, 0.12);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.apply-checkbox:hover {
  border-color: rgba(232, 200, 137, 0.35);
}
.apply-checkbox.selected {
  border-color: #c9a86a;
  background: rgba(201, 168, 106, 0.06);
}
.apply-checkbox input[type="checkbox"] {
  position: absolute;
  left: -10000px;
  opacity: 0;
}
.apply-checkbox-marker {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(244, 239, 230, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.25s ease, background 0.25s ease;
  position: relative;
}
.apply-checkbox.selected .apply-checkbox-marker {
  border-color: #c9a86a;
  background: #c9a86a;
}
.apply-checkbox.selected .apply-checkbox-marker::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #0a0b0e;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.apply-checkbox-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(244, 239, 230, 0.85);
}
.apply-checkbox.selected .apply-checkbox-text {
  color: #f4efe6;
}

/* ---------- ERROR MESSAGE ---------- */
.apply-error {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  color: #c77a4a;
  margin-top: 16px;
  min-height: 20px;
  letter-spacing: 0.02em;
}
.apply-error.apply-prefill-note {
  color: rgba(201, 168, 106, 0.85);
  font-style: italic;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 14px;
}

/* ---------- NAV ---------- */
.apply-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid rgba(232, 200, 137, 0.08);
}
@media (max-width: 560px) {
  .apply-nav {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .apply-nav-center {
    grid-column: 1 / -1;
    order: -1;
    margin-bottom: 16px;
  }
}
.apply-nav-center {
  display: flex;
  justify-content: center;
}
.apply-nav-dots {
  display: inline-flex;
  gap: 6px;
}
.apply-nav-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(244, 239, 230, 0.15);
  transition: background 0.25s ease, transform 0.25s ease;
}
.apply-nav-dot.answered {
  background: rgba(201, 168, 106, 0.45);
}
.apply-nav-dot.active {
  background: #c9a86a;
  transform: scale(1.4);
}
.apply-back {
  justify-self: start;
}
.apply-next {
  justify-self: end;
}
.apply-back:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ---------- BUTTONS (matches sitewide) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 28px;
  min-height: 52px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
  cursor: pointer;
  background: transparent;
}
.btn-primary {
  background: #f4efe6;
  color: #0a0b0e;
  border-color: #f4efe6;
}
.btn-primary span,
.btn-primary .arrow { color: #0a0b0e; }
.btn-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: rgba(244, 239, 230, 0.85);
  border-color: rgba(232, 200, 137, 0.4);
}
.btn-secondary span { color: rgba(244, 239, 230, 0.85); }
.btn-secondary:hover {
  border-color: #c9a86a;
  color: #f4efe6;
}
.btn-secondary:hover span { color: #f4efe6; }

/* ---------- SUBMITTING STATE ---------- */
.apply-submitting {
  text-align: center;
  padding: 80px 0;
}
.apply-submitting-spinner {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(244, 239, 230, 0.1);
  border-top-color: #c9a86a;
  border-radius: 50%;
  margin: 0 auto 32px auto;
  animation: applySpin 0.9s linear infinite;
}
@keyframes applySpin {
  to { transform: rotate(360deg); }
}
.apply-submitting-text {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: 18px;
  color: rgba(244, 239, 230, 0.7);
  margin: 0;
}

/* ---------- ERROR STATE ---------- */
.apply-submit-error {
  text-align: center;
  padding: 40px 0;
}
.apply-error-headline {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 300;
  font-size: 32px;
  color: #f4efe6;
  margin: 0 0 16px 0;
}
.apply-error-msg {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  color: rgba(244, 239, 230, 0.7);
  margin: 0 0 32px 0;
}
