/* ============================================================
   SwapUp Astana — Application Form
   Loaded after styles.css, reuses its :root colour variables.
   ============================================================ */

.apply-body {
    background: var(--color-soft-cream);
    font-family: var(--font-sans);
    color: var(--slate-900);
    margin: 0;
}

.apply-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Top bar ---------- */
.apply-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 28px;
    /* The SwapUp logo is white, so the bar keeps the brand green of the main nav. */
    background: var(--color-soft-purple);
}

.apply-logo img {
    height: 52px;
    width: auto;
    display: block;
}

.apply-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.apply-back:hover { opacity: 1; }
.apply-back svg { width: 16px; height: 16px; }

/* ---------- Intro ---------- */
.apply-intro {
    padding: 56px 0 40px;
    text-align: center;
}

.apply-eyebrow {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 100px;
    background: var(--color-soft-mint);
    color: #35701c;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.apply-h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
    color: var(--slate-900);
}

.apply-desc {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--slate-500);
}

.apply-facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

.apply-fact {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 100px;
    background: #fff;
    border: 1px solid rgba(92, 179, 56, 0.16);
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--slate-700);
}

.apply-fact svg { width: 15px; height: 15px; color: var(--color-soft-purple); }
.apply-fact-warn { background: var(--color-soft-peach); border-color: rgba(232, 160, 32, 0.3); color: #6b4a08; }
.apply-fact-warn svg { color: #b8790a; }

/* ---------- Card ---------- */
.apply-main { padding: 0 0 90px; }

.apply-card {
    background: #fff;
    border-radius: 36px;
    padding: 40px;
    box-shadow: 0 30px 80px rgba(30, 45, 26, 0.09);
    border: 1px solid rgba(92, 179, 56, 0.1);
}

/* ---------- Progress ---------- */
.apply-progress { margin-bottom: 34px; }

.apply-progress-bar {
    height: 7px;
    border-radius: 100px;
    background: var(--color-soft-mint);
    overflow: hidden;
}

.apply-progress-bar span {
    display: block;
    height: 100%;
    width: 20%;
    border-radius: 100px;
    background: var(--color-soft-purple);
    transition: width 0.35s ease;
}

.apply-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 11px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--slate-500);
}

#progress-pct { color: var(--color-soft-purple); }

/* ---------- Steps ---------- */
.apply-step {
    display: none;
    border: 0;
    margin: 0;
    padding: 0;
}

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

.step-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--slate-900);
}

.step-hint {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--slate-500);
    margin: 0 0 28px;
}

/* ---------- Fields ---------- */
.field-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.field { display: flex; flex-direction: column; }
.field-full { grid-column: 1 / -1; }
.field + .field-full, .field-full + .field-full { margin-top: 0; }

.apply-step > .field-full { margin-bottom: 24px; }

.field label {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 8px;
    line-height: 1.45;
}

.req { color: #e11d48; }

.field input,
.field select,
.field textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--slate-900);
    background: var(--color-soft-cream);
    border: 1.5px solid transparent;
    border-radius: 14px;
    padding: 13px 15px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.field textarea { resize: vertical; line-height: 1.6; }

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--color-soft-purple);
}

.field input.has-error,
.field select.has-error,
.field textarea.has-error {
    border-color: #e11d48;
    background: #fff5f7;
}

.field-note {
    margin: 7px 0 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--slate-500);
    opacity: 0.85;
}

.field-note-list { margin-bottom: 9px; }

.field-error {
    margin: 7px 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #e11d48;
}

.word-counter {
    align-self: flex-end;
    margin-top: 7px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--slate-500);
}

.word-counter.over { color: #e11d48; }

/* honeypot */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* ---------- Consent ---------- */
.consent-list { display: flex; flex-direction: column; gap: 14px; }

.consent {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 16px 18px;
    border-radius: 18px;
    background: var(--color-soft-cream);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.consent:hover { background: #eef7e8; }

.consent input {
    flex-shrink: 0;
    width: 19px;
    height: 19px;
    margin-top: 2px;
    accent-color: var(--color-soft-purple);
    cursor: pointer;
}

.consent span {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--slate-700);
}

.consent.has-error { border-color: #e11d48; background: #fff5f7; }

.signature-grid { margin-top: 26px; }

/* ---------- Review ---------- */
.review-block {
    border-radius: 22px;
    border: 1px solid rgba(92, 179, 56, 0.18);
    overflow: hidden;
    margin-bottom: 26px;
}

.review-head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 15px 20px;
    background: var(--color-soft-mint);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #35701c;
}

.review-head svg { width: 16px; height: 16px; }

.review-list { margin: 0; padding: 6px 20px 16px; }

.review-list div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 11px 0;
    border-bottom: 1px solid var(--slate-100);
}

.review-list div:last-child { border-bottom: 0; }

.review-list dt {
    flex: 0 0 210px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--slate-500);
}

.review-list dd {
    flex: 1;
    min-width: 200px;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--slate-900);
    white-space: pre-wrap;
    word-break: break-word;
}

/* ---------- Fee block ---------- */
.fee-block {
    border-radius: 24px;
    padding: 28px;
    background: var(--color-soft-cream);
    border: 1px solid rgba(92, 179, 56, 0.14);
}

.fee-block h3 {
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.5;
    margin: 0 0 20px;
    color: var(--slate-900);
}

.fee-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fee-steps li {
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--slate-700);
}

.fee-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: var(--color-soft-purple);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
}

.fee-note {
    margin: 20px 0 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--slate-500);
}

.submit-error {
    margin-top: 22px;
    padding: 15px 18px;
    border-radius: 16px;
    background: #fff5f7;
    border: 1px solid rgba(225, 29, 72, 0.28);
    font-size: 0.88rem;
    font-weight: 600;
    color: #be123c;
}

/* ---------- Nav ---------- */
.apply-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 34px;
    padding-top: 26px;
    border-top: 1px solid var(--slate-100);
}

.apply-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border: 0;
    border-radius: 100px;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.22s ease, transform 0.22s ease, opacity 0.22s ease;
}

.apply-btn svg { width: 16px; height: 16px; }

.apply-btn-primary { background: var(--color-soft-purple); color: #fff; }
.apply-btn-primary:hover { background: var(--color-accent-violet); transform: translateY(-2px); }
.apply-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.apply-btn-ghost { background: transparent; color: var(--slate-500); }
.apply-btn-ghost:hover { background: var(--color-soft-cream); color: var(--slate-900); }
.apply-btn-ghost[hidden] { display: none; }

#btn-prev { margin-right: auto; }
#btn-next, #btn-submit { margin-left: auto; }

.large-btn { padding: 16px 32px; font-size: 0.95rem; }

/* ---------- Success ---------- */
.apply-success { text-align: center; padding: 20px 0 10px; }

.success-icon {
    width: 74px;
    height: 74px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: var(--color-soft-mint);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon svg { width: 34px; height: 34px; color: var(--color-soft-purple); stroke-width: 3; }

.apply-success h2 {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0 0 14px;
    color: var(--slate-900);
}

.apply-success > p {
    max-width: 560px;
    margin: 0 auto 26px;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--slate-500);
}

.success-steps {
    max-width: 380px;
    margin: 0 auto 28px;
    text-align: left;
}

.success-note {
    max-width: 520px;
    margin: 24px auto 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--slate-500);
}

.success-back {
    display: inline-block;
    margin-top: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-soft-purple);
    text-decoration: none;
}

.success-back:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.apply-footer {
    padding: 30px 0 40px;
    border-top: 1px solid rgba(92, 179, 56, 0.12);
}

.apply-footer .apply-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.apply-footer p {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--slate-500);
    opacity: 0.7;
}

.apply-footer-links { display: flex; gap: 22px; }

.apply-footer-links a {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--slate-500);
    text-decoration: none;
}

.apply-footer-links a:hover { color: var(--color-soft-purple); }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
    .apply-card { padding: 26px 20px; border-radius: 28px; }
    .field-grid { grid-template-columns: 1fr; }
    .review-list dt { flex: 1 0 100%; }
    .apply-intro { padding: 40px 0 30px; }
    .apply-btn { padding: 13px 20px; font-size: 0.83rem; }
}

/* ---------- Pending (final step) state ---------- */
.apply-success.is-pending .success-icon {
    background: #fff1f2;
    font-size: 2.2rem;
    line-height: 1;
}

.pending-label {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 16px;
    border-radius: 100px;
    background: #fff1f2;
    color: #be123c;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.steps-title {
    margin: 0 0 14px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--slate-500);
}
