/* ===========================================================
   PURE FORM STYLES for apply.html
   (no header, footer, hero, or other global layout)
   =========================================================== */

/* -----------------------------------------------------------
   MULTI-STEP FORM — LAYOUT
----------------------------------------------------------- */
.form-page-main {
  margin: 0 auto;
  padding: 3rem 0rem;
}

/* Progress indicator */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 160px;
}

.step-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 1;
  background: var(--clr-border);
  color: var(--clr-text-muted);
  border: 2px solid var(--clr-border);
  transition: background .4s, color .4s, border-color .4s, box-shadow .4s;
}

.step-node.active .step-circle {
  background: var(--clr-primary);
  color: var(--clr-gold);
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 5px rgba(0,45,136,.12);
}

.step-node.completed .step-circle {
  background: var(--clr-gold);
  color: var(--clr-primary);
  border-color: var(--clr-gold);
}

.step-label {
  font-size: 0.67rem;
  font-weight: 600;
  margin-top: 6px;
  text-align: center;
  color: var(--clr-text-faint);
  line-height: 1.3;
  max-width: 80px;
  transition: color .3s;
}

.step-node.active .step-label    { color: var(--clr-primary); }
.step-node.completed .step-label { color: var(--clr-gold-dark); }

.step-connector {
  flex: 1;
  max-width: 80px;
  height: 3px;
  background: var(--clr-border);
  border-radius: 2px;
  margin-bottom: 28px;
  transition: background .4s;
}

.step-connector.done { background: var(--clr-gold); }

/* Form card */
.form-card {
  background: var(--clr-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.form-card__body { padding: 2rem; }

.form-card__heading {
    font-family: var(--font-display) !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--clr-primary) !important;
    margin-bottom: .25rem;
}

.form-card__sub {
  color: var(--clr-text-faint);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

/* -----------------------------------------------------------
   FORM ELEMENTS
----------------------------------------------------------- */

/* Section header bar */
.form-section-header {
  background: linear-gradient(90deg, rgba(0,45,136,.04), transparent);
  border-left: 4px solid var(--clr-primary);
  padding: 0.55rem 1rem;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--clr-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  border-radius: 0 0.5rem 0.5rem 0;
}

/* Field group wrapper */
.field-group { margin-bottom: 1.75rem; }

/* Labels */
.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-text-dark);
  margin-bottom: 0.35rem;
}

.field-required::after {
  content: ' *';
  color: #ef4444;
}

.field-hint {
  color: var(--clr-text-faint);
  font-size: 0.72rem;
  margin-top: 0.25rem;
}

/* Text / email / tel / number / date inputs */
.form-input {
  width: 100%;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-family: var(--font-body);
  color: var(--clr-text);
  background: var(--clr-white);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(0,45,136,.09);
}

.form-input::placeholder { color: var(--clr-text-faint); }

/* Select arrow */
select.form-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

/* Form grids */
.form-grid-2 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.form-grid-3 { display: grid; grid-template-columns: 1fr; gap: 1rem; }

/* -----------------------------------------------------------
   RADIO & CHECKBOX PILLS
----------------------------------------------------------- */
.radio-group,
.checkbox-group { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* Hide native inputs */
.radio-pill    input[type="radio"],
.checkbox-pill input[type="checkbox"] { display: none; }

/* Shared pill label */
.radio-pill label,
.checkbox-pill label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  color: #475569;
  user-select: none;
  transition: border-color .2s, background .2s, color .2s;
}

.radio-pill    input:checked + label,
.checkbox-pill input:checked + label {
  border-color: var(--clr-primary);
  background: rgba(0,45,136,.07);
  color: var(--clr-primary);
}

/* Radio circle */
.radio-pill label::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
  transition: border-color .2s, background .2s;
}

.radio-pill input:checked + label::before {
  border-color: var(--clr-primary);
  background: var(--clr-primary);
  box-shadow: inset 0 0 0 2.5px var(--clr-white);
}

/* Checkbox square */
.checkbox-pill label::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
  transition: all .2s;
}

.checkbox-pill input:checked + label::before {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3.5 7L9 1' stroke='white' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

/* -----------------------------------------------------------
   FILE UPLOAD
----------------------------------------------------------- */
.uploads-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }

.file-upload-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.75rem 1rem;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--clr-text-muted);
  transition: border-color .2s, background .2s, color .2s;
}

.file-upload-label:hover {
  border-color: var(--clr-primary);
  background: rgba(0,45,136,.03);
  color: var(--clr-primary);
}

.file-upload-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: rgba(0,45,136,.08);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-primary);
  font-size: 0.85rem;
}

.file-name {
  display: block;
  color: var(--clr-primary);
  font-weight: 600;
  font-size: 0.82rem;
}

.file-hint {
  display: block;
  color: var(--clr-text-faint);
  font-size: 0.7rem;
}

input[type="file"] { display: none; }

/* -----------------------------------------------------------
   RULES BOX & AGREE CHECKBOX
----------------------------------------------------------- */
.rules-box {
  border: 2px solid var(--clr-primary);
  border-radius: var(--radius-md);
  height: 220px;
  overflow-y: auto;
  padding: 1.25rem;
  background: rgba(0,45,136,.02);
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--clr-text-dark);
  margin-bottom: 1rem;
}

.rules-box::-webkit-scrollbar       { width: 6px; }
.rules-box::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 3px; }
.rules-box::-webkit-scrollbar-thumb { background: var(--clr-primary); border-radius: 3px; }

.rules-box ol {
  list-style: decimal;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.agree-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--clr-text-dark);
  padding: 0.875rem 1rem;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  user-select: none;
  transition: border-color .2s, background .2s;
}

.agree-label:has(input:checked) {
  border-color: var(--clr-primary);
  background: rgba(0,45,136,.04);
}

.agree-checkbox {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
  accent-color: var(--clr-primary);
}

/* -----------------------------------------------------------
   FORM NAVIGATION BUTTONS
----------------------------------------------------------- */
.form-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.75rem;
}

.btn-step-prev {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f1f5f9 !important;
  color: #475569 !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  padding: 0.7rem 1.6rem !important;
  border-radius: var(--radius-full) !important;
  border: none;
  transition: background var(--transition), color var(--transition);
  font-family: "DM Sans", Sans-serif !important;
    letter-spacing: normal !important;
}

.btn-step-prev:hover {
  background: var(--clr-border) !important;
  color: var(--clr-text) !important;
}

.btn-step-next {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--clr-primary) !important;
  color: var(--clr-white) !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  padding: 0.7rem 1.8rem !important;
  border-radius: var(--radius-full) !important;
  border: none;
  transition: background var(--transition), box-shadow var(--transition);
  font-family: "DM Sans", Sans-serif !important;
    letter-spacing: normal !important;
}

.btn-step-next:hover {
  background: var(--clr-primary-dark) !important;
  box-shadow: 0 6px 20px rgba(0,45,136,.3);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--clr-gold) !important;
  color: var(--clr-primary) !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  padding: 0.875rem 2rem !important;
  border-radius: var(--radius-full) !important;
  border: none;
  transition: background var(--transition), box-shadow var(--transition) !important;
  font-family: "DM Sans", Sans-serif !important;
    letter-spacing: normal !important;
}

.btn-submit:hover {
  background: var(--clr-gold-dark) !important;
  box-shadow: 0 6px 24px rgba(255,184,0,.4);
}

/* -----------------------------------------------------------
   STEP PANE SHOW/HIDE
----------------------------------------------------------- */
.step-pane { display: none; }
.step-pane.active { display: block; animation: fadeInUp .35s ease; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* -----------------------------------------------------------
   SUCCESS SCREEN
----------------------------------------------------------- */
#success-screen { display: none; }

.success-card {
  background: var(--clr-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
  padding: 4rem 2rem;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: #f0fdf4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.success-icon i { font-size: 3rem; color: #22c55e; }

.success-heading {
    font-family: var(--font-display) !important;
    font-size: 1.875rem !important;
    font-weight: 700 !important;
    color: var(--clr-primary) !important;
    margin-bottom: .75rem;
}

.success-sub {
  color: var(--clr-text-muted);
  font-size: 1rem;
  max-width: 420px;
  margin: 0 auto 1.5rem;
}

.success-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,184,0,.15);
  color: var(--clr-primary);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-full);
  margin-bottom: 2rem;
}

.success-note i { color: var(--clr-gold); }

.success-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Submit-in-progress: spinner + no double-click */
.acme-form-builder-embed .btn-submit:disabled {
  cursor: wait;
  opacity: 1;
}

.acme-form-builder-embed .btn-submit.acme-btn-submitting {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.acme-form-builder-embed .acme-submit-spinner {
  display: inline-flex;
  align-items: center;
}

.acme-form-builder-embed .acme-submit-spinner .fa-spinner {
  font-size: 1.05em;
}


/* -----------------------------------------------------------
   TOAST NOTIFICATION
----------------------------------------------------------- */
#toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--clr-white);
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  z-index: 9999;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideUp .3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===========================================================
   RESPONSIVE BREAKPOINTS (form only)
   =========================================================== */

/* Tablet ≥ 640px */
@media (min-width: 640px) {
  .form-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .uploads-grid { grid-template-columns: repeat(2, 1fr); }
  .form-nav { flex-wrap: nowrap; }
  .btn-submit, .btn-step-prev { width: auto; }
}

/* Medium ≥ 768px */
@media (min-width: 768px) {
  .form-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .form-card__body { padding: 2.5rem; }
}

/* Small < 640px */
@media (max-width: 639px) {
  .form-nav { flex-direction: column-reverse; }
  .btn-step-prev,
  .btn-step-next,
  .btn-submit { width: 100%; justify-content: center; }
  .success-actions { flex-direction: column; align-items: center; }
}

/* Width-based field rows (builder: 25 / 33 / 50 / 100 %) */
.acme-form-builder-embed .acme-fb-field-row-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.acme-form-builder-embed .acme-fb-field-cell {
  min-width: 0;
  box-sizing: border-box;
}

.acme-form-builder-embed .acme-fb-field-cell--100 {
  flex: 1 1 100%;
  max-width: 100%;
}

.acme-form-builder-embed .acme-fb-field-cell--50 {
  flex: 1 1 calc(50% - 6px);
  max-width: calc(50% - 6px);
}

.acme-form-builder-embed .acme-fb-field-cell--33 {
  flex: 1 1 calc(33.333% - 8px);
  max-width: calc(33.333% - 8px);
}

.acme-form-builder-embed .acme-fb-field-cell--25 {
  flex: 1 1 calc(25% - 9px);
  max-width: calc(25% - 9px);
}

@media (max-width: 640px) {
  .acme-form-builder-embed .acme-fb-field-cell--50,
  .acme-form-builder-embed .acme-fb-field-cell--33,
  .acme-form-builder-embed .acme-fb-field-cell--25 {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

.acme-form-builder-embed textarea.form-input {
  resize: vertical;
  min-height: 5rem;
  line-height: 1.45;
}