/* ===================================================================
   Easy As Loans — full-page application form (apply.html)
   Driva-style layout in the brand palette. Uses tokens from styles.css.
   =================================================================== */

body.apply-page { background: #f4f3f8; }

/* Top bar */
.apply-top { background: #fff; border-bottom: 1px solid var(--line); }
.apply-top .container { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.apply-top .logo-easy { font-size: 1.55rem; }
.apply-exit { font-weight: 700; font-size: 0.92rem; color: var(--grey); display: inline-flex; align-items: center; gap: 7px; }
.apply-exit:hover { color: var(--purple); }

/* Shell */
.apply-wrap {
  display: grid; grid-template-columns: 270px minmax(0, 1fr);
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
}

/* Sidebar */
.apply-side { padding: 44px 24px 44px 0; position: sticky; top: 0; align-self: start; }
.apply-back {
  background: none; border: none; font-family: inherit; cursor: pointer;
  color: var(--muted); font-weight: 700; font-size: 0.95rem;
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; margin-bottom: 34px;
}
.apply-back:hover { color: var(--purple); }
.apply-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.apply-step { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 600; font-size: 1rem; }
.apply-dot {
  width: 18px; height: 18px; border-radius: 50%; background: #cdc7da; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: #fff;
}
.apply-step.is-active { color: var(--ink); font-weight: 800; }
.apply-step.is-active .apply-dot { background: var(--purple); box-shadow: 0 0 0 4px var(--purple-line); }
.apply-step.is-done { color: var(--ink); }
.apply-step.is-done .apply-dot { background: var(--purple); }
.apply-help { margin-top: 64px; }
.apply-help-h { font-size: 0.8rem; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.apply-help-num { font-weight: 800; color: var(--purple); font-size: 1.05rem; display: inline-flex; align-items: center; gap: 7px; }

/* Mobile progress (shown < 820px) */
.apply-mobilebar { display: none; }

/* Main / question column */
.apply-main { padding: 48px 0 90px; display: flex; justify-content: center; }
.q { width: 100%; max-width: 520px; text-align: center; }
.q-title { font-size: clamp(1.4rem, 3vw, 1.75rem); font-weight: 800; color: var(--ink); line-height: 1.25; }
.q-sub { margin-top: 6px; color: var(--muted); font-size: 0.98rem; }
.q-body { margin-top: 30px; text-align: left; }

.btn-continue {
  margin-top: 28px; width: 100%; background: var(--purple); color: #fff; border: none;
  border-radius: 6px; padding: 16px; font-family: inherit; font-weight: 800; font-size: 1rem; cursor: pointer;
}
.btn-continue:hover { background: var(--purple-dark); }
.btn-continue:disabled { opacity: 0.6; cursor: default; }
.q-trust { margin-top: 14px; font-size: 0.85rem; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 7px; }
.credit-ico { width: 18px; height: 18px; color: var(--purple); flex: 0 0 auto; }
.q-error { margin-top: 12px; color: #c0392b; font-weight: 700; font-size: 0.9rem; }

/* Controls */
.amount-field { position: relative; }
.amount-field input {
  width: 100%; font-size: 1.15rem; font-weight: 800; color: var(--ink);
  padding: 15px 16px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font-family: inherit;
}
.amount-field input:focus { outline: none; border-color: var(--purple); }
.range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 5px; margin-top: 20px;
  background: var(--track); border-radius: 99px; outline: none;
}
.range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--purple); border: 3px solid #fff; box-shadow: 0 1px 3px rgba(72,32,110,.4); cursor: pointer; }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--purple); border: 3px solid #fff; cursor: pointer; }

.optrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.optrow.one { grid-template-columns: 1fr; }
.optrow.lastwide .opt-btn:last-child { grid-column: 1 / -1; }
.opt-btn {
  padding: 15px 16px; border: 1px solid var(--border); border-radius: 6px; background: #fff;
  font-family: inherit; font-weight: 700; font-size: 0.97rem; color: var(--ink); cursor: pointer; text-align: center;
}
.opt-btn:hover { border-color: var(--purple); }
.opt-btn.is-selected { background: var(--purple); border-color: var(--purple); color: #fff; }

.q-label { display: block; font-weight: 700; font-size: 0.95rem; color: var(--ink); margin: 22px 0 10px; text-align: center; }
.q-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.q-field > label { font-size: 0.85rem; font-weight: 700; color: var(--ink); }
.q-field.idf { text-align: center; margin-bottom: 18px; gap: 2px; }
.q-field.idf > label { font-size: 1rem; font-weight: 700; }
.q-hint { font-size: 0.82rem; color: var(--muted); margin-bottom: 8px; }
.q-field.idf .q-input { text-align: left; }
.q-input, .q-select {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink);
  padding: 14px; border: 1px solid var(--border); border-radius: 6px; background: #fff;
}
.q-input:focus, .q-select:focus { outline: none; border-color: var(--purple); }
.q-twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.q-consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; font-size: 0.9rem; color: var(--grey); text-align: left; }
.q-consent input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--purple); flex: 0 0 auto; }

/* Helper bubble */
.helper { display: flex; gap: 12px; align-items: flex-start; background: #ece7f5; border-radius: 12px; padding: 14px 16px; margin-top: 28px; text-align: left; }
.helper-av { width: 42px; height: 42px; border-radius: 50%; background: #fff; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.helper-av svg { width: 26px; height: auto; }
.helper-text { font-size: 0.92rem; color: var(--ink); line-height: 1.5; }

/* Success */
.apply-done { max-width: 520px; text-align: center; }
.apply-done .success-tick { width: 64px; height: 64px; margin: 0 auto 18px; }
.apply-done .success-tick svg { width: 100%; height: 100%; }
.apply-done .success-tick .logo-stroke { stroke: var(--purple); stroke-width: 5; fill: none; }
.apply-done h1 { font-size: 1.7rem; font-weight: 800; color: var(--purple); }
.apply-done p { margin-top: 12px; color: var(--grey); }
.apply-done .btn-continue { max-width: 260px; margin-left: auto; margin-right: auto; }

@media (max-width: 820px) {
  .apply-wrap { grid-template-columns: 1fr; }
  .apply-side { display: none; }
  .apply-mobilebar { display: block; padding: 18px 24px 0; max-width: 560px; margin: 0 auto; }
  .apply-mobilebar .mb-row { display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
  .apply-mobilebar .mb-track { height: 5px; background: var(--track); border-radius: 99px; }
  .apply-mobilebar .mb-fill { height: 100%; background: var(--purple); border-radius: 99px; transition: width .2s ease; }
  .apply-main { padding: 26px 0 70px; }
}
