/* Application pages (e.g. /australia-eta/) - builds on landing.css tokens */

/* Page hero */
.apply-hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--mint) 0%, #f5fbfa 80%, #fff 100%); }
.apply-hero::before { content: ""; position: absolute; width: 760px; height: 760px; right: -240px; top: -300px; border-radius: 50%; background: radial-gradient(closest-side, rgba(41, 182, 209, .16), rgba(41, 182, 209, 0)); pointer-events: none; }
.apply-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 32px; align-items: center; padding-block: 36px 40px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .8125rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--teal-ink); text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.apply-hero h1 { font-size: clamp(1.85rem, 1.3rem + 2vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; }
.doc-pill { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 6px 12px 6px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: .8125rem; font-weight: 600; color: var(--text); }
.doc-pill img { width: 20px; height: 15px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
textarea { font: inherit; color: inherit; }
.apply-hero .lead { margin-top: 14px; max-width: 620px; font-size: 1.0625rem; color: var(--muted); }
.facts { margin-top: 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 640px; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.fact strong { display: block; font-family: var(--font-head); font-size: 1.0625rem; color: var(--navy); line-height: 1.25; }
.fact span { font-size: .8125rem; color: var(--muted); }
.apply-hero-media { display: flex; justify-content: center; }
.apply-hero-media img { width: min(100%, 380px); }

/* Layout */
.apply-main { padding-block: 36px 80px; background: #fff; }
.apply-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }

/* Stepper */
.stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 18px; counter-reset: st; }
.stepper li { position: relative; display: flex; flex-direction: column; gap: 8px; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.stepper li::before { content: ""; align-self: stretch; height: 6px; border-radius: 99px; background: var(--line); transition: background-color .2s; }
.stepper li[data-state="done"]::before, .stepper li[data-state="current"]::before { background: var(--teal); }
.stepper li[data-state="current"] { color: var(--navy); }
.stepper li[data-state="done"] { color: var(--teal-ink); }
.stepper .st-num { font-family: var(--font-head); font-weight: 800; margin-right: 4px; }

/* Form card */
.form-card { background: #fff; border: 1px solid rgba(0, 43, 91, .08); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 28px; }
.form-step[hidden] { display: none; }
.step-head { margin-bottom: 22px; }
.step-head h2 { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.015em; }
.step-head p { margin-top: 6px; color: var(--muted); font-size: .9375rem; }
.form-group { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.form-group > legend, .group-title { font-family: var(--font-head); font-size: 1rem; font-weight: 800; color: var(--ink); padding: 0; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }

.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f > label, .f-label { font-size: .875rem; font-weight: 600; color: var(--ink); }
.req { color: var(--red); margin-left: 2px; }
.f .hint { font-size: .8125rem; color: var(--muted); line-height: 1.4; }
.input, .f select { width: 100%; height: 50px; padding: 0 14px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--ink); font-weight: 500; }
.f select { padding-right: 40px; appearance: none; -webkit-appearance: none; cursor: pointer; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23002b5b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px; text-overflow: ellipsis; }
.input::placeholder { color: #98a2aa; font-weight: 400; }
.input:hover, .f select:hover { border-color: #a9b6bf; }
.input:focus, .f select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(41, 182, 209, .2); }
[aria-invalid="true"].input, .f select[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 4px rgba(226, 34, 82, .1); }
.f .err { font-size: .8125rem; font-weight: 600; color: #b5163f; }
.f .err:empty { display: none; }
.phone-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px; }

/* Choice tiles (radio / checkbox) */
.choices { display: grid; gap: 10px; }
.choices.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.choice:hover { border-color: #a9b6bf; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .mark { width: 20px; height: 20px; margin-top: 1px; border: 2px solid var(--line-strong); border-radius: 50%; flex: none; display: grid; place-items: center; background: #fff; transition: border-color .15s, background-color .15s; }
.choice input[type="checkbox"] + .mark { border-radius: 6px; }
.choice input:checked + .mark { border-color: var(--navy); background: var(--navy); }
.choice input:checked + .mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.choice input[type="checkbox"]:checked + .mark::after { width: 11px; height: 11px; border-radius: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; }
.choice:has(input:checked) { border-color: var(--navy); background: var(--ice-2); }
.choice:has(input:focus-visible) { outline: 3px solid var(--teal); outline-offset: 2px; }
.choice .c-text strong { display: block; color: var(--ink); font-size: .9375rem; line-height: 1.35; }
.choice .c-text span { display: block; color: var(--muted); font-size: .8125rem; line-height: 1.4; margin-top: 2px; }
.choice .c-side { margin-left: auto; font-weight: 700; color: var(--navy); font-size: .875rem; white-space: nowrap; }
.choices[aria-invalid="true"] .choice { border-color: var(--red); }

/* Yes / No questions */
.yn { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.yn:first-of-type { border-top: 0; padding-top: 0; }
.yn p { color: var(--ink); font-size: .9375rem; }
.yn .choices { grid-template-columns: repeat(2, 84px); }
.yn .choice { padding: 10px 12px; justify-content: center; align-items: center; }
.yn .choice .mark { margin-top: 0; }
.yn .err { grid-column: 1 / -1; }
.yn-detail { grid-column: 1 / -1; }
.yn-detail[hidden] { display: none; }
textarea.input { height: auto; min-height: 92px; padding: 12px 14px; resize: vertical; line-height: 1.5; }

/* Uploads */
.upload { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 176px; padding: 18px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--ice-2); text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s; }
.upload:hover, .upload.is-drag { border-color: var(--teal); background: var(--teal-soft); }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload input:focus-visible + .up-body { outline: 3px solid var(--teal); outline-offset: 4px; border-radius: 8px; }
.upload .up-icon { width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--navy); display: grid; place-items: center; box-shadow: var(--shadow-sm); margin-inline: auto; }
.upload .up-icon svg { width: 22px; height: 22px; }
.upload strong { display: block; color: var(--ink); font-size: .9375rem; margin-top: 8px; }
.upload small { display: block; color: var(--muted); font-size: .8125rem; }
.upload img.preview { max-height: 132px; width: auto; border-radius: 8px; box-shadow: var(--shadow-sm); }
.upload.has-file { border-style: solid; border-color: var(--teal); background: #fff; }
.upload[aria-invalid="true"] { border-color: var(--red); }

/* Notices */
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--ice-2); border: 1px solid var(--line); font-size: .875rem; color: var(--text); }
.notice svg { width: 20px; height: 20px; flex: none; color: var(--teal-ink); margin-top: 1px; }
.notice strong { color: var(--ink); }
.notice.warn { background: #fff7e8; border-color: #f3dcae; }
.notice.warn svg { color: #b26b00; }
.notice[hidden] { display: none; }
.notice a { color: var(--teal-ink); font-weight: 700; }

/* Navigation buttons */
.form-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-nav .btn[hidden] { display: none; }
.form-nav .spacer { flex: 1; }

/* Review */
.review-block { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--ice-2); border-bottom: 1px solid var(--line); }
.review-head h3 { font-size: 1rem; font-weight: 800; }
.review-head button { border: 0; background: none; color: var(--teal-ink); font-weight: 700; font-size: .875rem; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.review-head button:hover { background: #fff; }
.review-list { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 0; padding: 6px 16px 10px; }
.review-list dt, .review-list dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.review-list dt { color: var(--muted); padding-right: 12px; }
.review-list dd { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.review-list dt:nth-last-of-type(1), .review-list dd:last-of-type { border-bottom: 0; }

/* Confirmation */
.done { text-align: center; padding: 18px 6px 6px; }
.done .done-icon { width: 68px; height: 68px; border-radius: 50%; background: #e1f6ec; color: #12805a; display: grid; place-items: center; margin: 0 auto 16px; }
.done .done-icon svg { width: 34px; height: 34px; }
.done h2 { font-size: 1.5rem; font-weight: 800; }
.done p { margin: 10px auto 0; max-width: 520px; color: var(--muted); }
.done .ref { display: inline-block; margin-top: 16px; padding: 8px 14px; border-radius: 10px; background: var(--ice-2); border: 1px solid var(--line); font-family: var(--font-head); font-weight: 800; color: var(--navy); letter-spacing: .04em; }
.done .btn { margin-top: 22px; }

/* Sidebar */
.apply-aside { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 16px; }
.aside-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.aside-card h3 { font-size: 1.0625rem; font-weight: 800; margin-bottom: 12px; }
.aside-card .check-list li { font-size: .9375rem; margin-bottom: 10px; }
.aside-card.dark { background: var(--navy); border-color: var(--navy); color: #d7e3ee; }
.aside-card.dark h3 { color: #fff; }
.aside-card.dark p { font-size: .875rem; color: #b8c8d8; }
.aside-card.dark a { color: #fff; font-weight: 700; }
.mini-facts { display: grid; gap: 8px; }
.mini-facts div { display: flex; justify-content: space-between; gap: 12px; font-size: .875rem; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.mini-facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-facts dt { color: var(--muted); }
.mini-facts dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; }
.legal-note { margin-top: 18px; font-size: .8125rem; color: var(--muted); }
.legal-note strong { color: var(--text); }

/* Info section below the form */
.eta-info { background: var(--ice-2); }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.info-card h3 { font-size: 1.125rem; font-weight: 800; }
.info-card p { margin-top: 8px; color: var(--muted); font-size: .9375rem; }
.country-list { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.country-list li { font-size: .8125rem; padding: 4px 10px; border-radius: 999px; background: var(--ice-2); border: 1px solid var(--line); color: var(--text); }

/* Responsive */
@media (max-width: 1080px) {
  .apply-layout { grid-template-columns: 1fr; }
  .apply-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .apply-hero-grid { grid-template-columns: 1fr; padding-block: 28px 8px; }
  .apply-hero-media { display: none; }
  .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .form-card { padding: 20px 16px; border-radius: var(--radius); }
  .grid-2, .grid-3, .choices.cols-2, .choices.cols-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .facts { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .fact { padding: 10px; }
  .fact strong { font-size: .9375rem; }
  .stepper .st-label { display: none; }
  .stepper li { align-items: center; }
  .apply-aside { grid-template-columns: 1fr; }
  .yn { grid-template-columns: 1fr; }
  .review-list { grid-template-columns: 1fr; }
  .review-list dt { border-bottom: 0; padding-bottom: 0; }
  .phone-row { grid-template-columns: 120px minmax(0, 1fr); }
  .form-nav .btn { flex: 1; }
}
