/* Careers portal additions — builds on styles.css (same tokens and look) */

.page-hero--compact { padding-block: clamp(2.5rem, 5vw, 3.5rem) 1rem; }
.page-hero--compact h1 { font-size: var(--step-4); }
.req { color: #a8742a; }

.apply-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.apply-layout .done { grid-column: 2; }

/* progress stepper */
.stepper { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; position: sticky; top: 110px; }
.stepper li {
  display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 12px;
  color: var(--mist); font-size: .98rem; cursor: default;
}
.stepper li span {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font: 600 1.05rem var(--font-display); color: #0b4f4c;
  background: linear-gradient(180deg, #fff, rgba(255,255,255,.6)); border: 1px solid rgba(12,119,118,.25);
}
.stepper li.is-done { cursor: pointer; color: var(--pearl); }
.stepper li.is-done span { background: rgba(127,211,199,.35); border-color: transparent; }
.stepper li.is-current { color: var(--pearl); background: linear-gradient(165deg, rgba(255,255,255,.95), rgba(255,255,255,.7)); box-shadow: inset 0 1px 0 #fff, 0 10px 26px -16px rgba(9,47,49,.3); }
.stepper li.is-current span { color: #1d1406; border-color: transparent; background: radial-gradient(circle at 35% 30%, #fff3cf, #d6a651 55%, #b8862f); }

/* form steps */
.apply-form { padding: clamp(1.4rem, 3vw, 2.4rem); }
.apply-form .step { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 1.15rem; }
.apply-form .step[hidden] { display: none; }
.step-title { font-family: var(--font-display); font-size: var(--step-3); font-weight: 500; color: #0b4f4c; padding: 0; margin-bottom: .2rem; }
.sub-title { font-size: var(--step-1); margin: 1rem 0 0; }
.form .row--3 { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 620px) { .form .row--3 { grid-template-columns: 1fr; } }

.q { border: 0; margin: 0; padding: 0; min-width: 0; }
.q legend { font-size: .92rem; margin-bottom: .5rem; padding: 0; color: var(--pearl); }

/* checkbox and radio chips */
.choice-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice { position: relative; display: inline-flex; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; width: 100% !important; }
.choice span {
  display: inline-block; padding: .55rem 1rem; border-radius: 999px; font-size: .95rem;
  border: 1px solid rgba(12,119,118,.22); background: linear-gradient(180deg, #fff, rgba(255,255,255,.65));
  box-shadow: inset 0 1px 0 #fff; transition: background-color .15s, color .15s;
}
.choice input:checked + span { background: #0f6a65; color: #fff; border-color: #0f6a65; }
.choice input:focus-visible + span { outline: 2px solid #a8742a; outline-offset: 2px; }

.choice--plain { display: flex; gap: .7rem; align-items: flex-start; }
.choice--plain input { position: static; opacity: 1; width: 18px !important; height: 18px; flex: none; margin-top: .25rem; accent-color: #0f6a65; }
.choice--plain span { padding: 0; border: 0; background: none; box-shadow: none; border-radius: 0; font-size: .95rem; color: var(--pearl); }
.choice--plain input:checked + span { background: none; color: var(--pearl); }
.choice--plain[hidden] { display: none; }

/* repeatable blocks (jobs, references) */
.repeat { display: grid; gap: .9rem; padding: 1.1rem; border-radius: 16px; background: rgba(255,255,255,.55); border: 1px solid rgba(12,119,118,.14); }
.repeat__head { display: flex; justify-content: space-between; align-items: center; }
.repeat__head strong { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: #0b4f4c; }
#work-list, #ref-list { display: grid; gap: 1rem; }
.link-btn { background: none; border: 0; padding: .2rem .3rem; color: #a8742a; font: 500 .9rem var(--font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn--small { padding: .7rem 1.2rem; justify-self: start; }

/* file upload */
.file-field { display: grid; gap: .55rem; }
.drop {
  position: relative; display: grid; place-items: center; text-align: center; padding: 1.6rem 1rem; cursor: pointer;
  border: 1.5px dashed rgba(12,119,118,.35); border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(237,248,246,.6));
  transition: border-color .15s, background-color .15s;
}
.drop:hover, .drop.is-over { border-color: #c8953e; background: rgba(255,255,255,.95); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100% !important; height: 100%; }
.drop__text { color: #0b4f4c; font-weight: 500; }
.drop__text small { display: block; color: var(--mist); font-weight: 400; margin-top: .2rem; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.file-list li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .55rem .8rem; border-radius: 10px; background: #fff; border: 1px solid rgba(12,119,118,.15); font-size: .95rem; }

/* review */
.review dl { display: grid; grid-template-columns: minmax(120px, 30%) 1fr; gap: .45rem 1rem; margin: 0 0 .5rem; padding: 1rem 1.1rem; border-radius: 14px; background: rgba(255,255,255,.6); border: 1px solid rgba(12,119,118,.14); }
.review dt { color: var(--mist); font-size: .92rem; }
.review dd { margin: 0; word-break: break-word; }

.step-nav { display: flex; justify-content: space-between; gap: .8rem; margin-top: 1.6rem; padding-top: 1.3rem; border-top: 1px solid rgba(214,166,81,.3); }
.step-nav #next, .step-nav #submit { margin-left: auto; }
.step-nav [hidden] { display: none; }
.form-status { margin: .9rem 0 0; color: #0b4f4c; font-weight: 500; }
.done { padding: clamp(1.6rem, 4vw, 3rem); }
.done:focus { outline: none; }

@media (max-width: 900px) {
  .apply-layout { grid-template-columns: 1fr; }
  .apply-layout .done { grid-column: auto; }
  .stepper { position: static; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .25rem; overflow-x: auto; }
  .stepper li { flex-direction: column; gap: .3rem; padding: .5rem .3rem; font-size: .78rem; text-align: center; }
}
@media (max-width: 560px) {
  .stepper li { font-size: 0; }
  .stepper li span { font-size: 1rem; }
  .step-nav .btn { flex: 1; }
}

/* keep the WhatsApp button compact so it doesn't cover the form buttons */
.apply-page .wa-chat span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.apply-page .wa-chat { padding: .95rem; }
.apply-page .step-nav { padding-right: 0; }
@media (max-width: 900px) { .apply-page main { padding-bottom: 4rem; } }

/* .form label is display:block in styles.css; keep chips and consent rows laid out correctly */
.form label.choice { display: inline-flex; margin-bottom: 0; }
.form label.choice--plain { display: flex; }
.form label.choice--plain[hidden] { display: none; }
.form label.drop { display: grid; margin-bottom: 0; }
.step-title { line-height: 1.1; }

/* ---------- sending overlay (prevents double submissions) ---------- */
body.is-sending { overflow: hidden; }
.sending {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1.5rem;
  background: rgba(253,252,249,.72);
  -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%);
}
.sending[hidden] { display: none; }
.sending__card {
  width: min(100%, 440px); text-align: center; padding: 2.2rem 2rem;
  border-radius: 24px; border: 1px solid #fff;
  background: linear-gradient(165deg, rgba(255,255,255,.98), rgba(255,255,255,.85));
  box-shadow: inset 0 1px 0 #fff, 0 30px 70px -30px rgba(9,47,49,.45);
}
.sending__card h2 { font-size: var(--step-2); margin: 1.1rem 0 .5rem; }
.sending__card p { margin: 0 auto 1.2rem; color: var(--mist); }
.sending__ring {
  width: 64px; height: 64px; margin: 0 auto; border-radius: 50%;
  border: 4px solid rgba(127,211,199,.3); border-top-color: #c8953e; border-right-color: #0f6a65;
  animation: spin 1s linear infinite;
}
.sending__bar { height: 4px; border-radius: 4px; background: rgba(127,211,199,.25); overflow: hidden; }
.sending__bar span { display: block; height: 100%; width: 40%; border-radius: 4px; background: linear-gradient(90deg, #d6a651, #0f6a65); animation: slide 1.4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) {
  .sending__ring { animation: spin 2.4s linear infinite !important; }
  .sending__bar span { animation: none !important; width: 100%; opacity: .5; }
}
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }

/* ---------- success dialog ---------- */
.success-dialog {
  width: min(100% - 2rem, 560px); max-height: calc(100% - 2rem); overflow: auto;
  padding: clamp(1.6rem, 4vw, 2.4rem); border: 1px solid #fff; border-radius: 26px; color: var(--pearl);
  background: linear-gradient(165deg, #fff 0%, rgba(255,255,255,.96) 55%, #f4fbf9 100%);
  box-shadow: 0 40px 90px -30px rgba(9,47,49,.5);
}
.success-dialog::backdrop { background: rgba(9,47,49,.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.success-dialog[open] { animation: pop .35s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.success-dialog__icon { color: #0f6a65; margin-bottom: .6rem; }
.success-dialog__icon svg circle { stroke: #d6a651; }
.success-dialog h2 { font-size: var(--step-3); margin-bottom: .4rem; }
.success-dialog .lede { margin-bottom: 1.2rem; }
.success-dialog__ref {
  display: grid; gap: .2rem; padding: 1rem 1.2rem; margin-bottom: 1.2rem; border-radius: 16px;
  background: linear-gradient(180deg, rgba(242,217,160,.35), rgba(242,217,160,.15)); border: 1px solid rgba(214,166,81,.45);
  font-size: .92rem; color: var(--mist);
}
.success-dialog__ref strong { font: 600 1.7rem/1.2 var(--font-display); color: #0b4f4c; letter-spacing: .02em; }
.success-dialog__ref small { font-size: .85rem; }
.success-dialog__next { margin-bottom: .4rem; }
.success-dialog .btn-row { margin-top: 1.4rem; }
@media (prefers-reduced-motion: reduce) { .success-dialog[open] { animation: none; } }

/* anything marked hidden stays hidden, whatever its layout class */
[hidden] { display: none !important; }
