/* Careers: application dialog with CV upload (opened by [data-apply] buttons, see /assets/js/apply.js) */
html.ap-lock { overflow: hidden; }
.apply-modal { width: min(760px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); overflow: hidden; }
.apply-modal[open] { display: flex; flex-direction: column; animation: apIn .28s ease both; }
.apply-modal::backdrop { background: rgba(23, 10, 12, .6); backdrop-filter: blur(2px); }
@keyframes apIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.ap-in { position: relative; overflow-y: auto; overscroll-behavior: contain; }
.ap-x { position: absolute; z-index: 2; right: 14px; top: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; transition: background .2s; }
.ap-x:hover { background: rgba(255, 255, 255, .28); }
.ap-head { padding: 26px 64px 22px 30px; background: linear-gradient(135deg, var(--red-900), var(--red) 70%, #B4302F); color: #fff; }
.ap-kicker { display: block; font: 700 12px/1 var(--h); letter-spacing: .12em; text-transform: uppercase; color: #FFB36B; margin-bottom: 8px; }
.ap-head h2 { font: 800 clamp(22px, 2.4vw, 28px)/1.2 var(--h); color: #fff; margin: 0; }
.ap-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ap-meta span { font: 600 12.5px/1 var(--b); color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); padding: 7px 12px; border-radius: 999px; }
.ap-form { padding: 24px 30px 26px; }
.ap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.ap-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ap-l { font: 600 13px/1.3 var(--h); color: var(--ink-2); }
.ap-l b { color: var(--red); }
.ap-field input:not([type=checkbox]):not([type=file]), .ap-field select, .ap-field textarea { width: 100%; height: 44px; padding: 0 12px; border: 1.5px solid #E2DDD8; border-radius: 10px; background: #fff; font: 400 15px var(--b); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.ap-field textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 84px; }
.ap-field input:focus, .ap-field select:focus, .ap-field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(243, 112, 33, .16); }
.ap-pre { display: flex; }
.ap-pre span { display: grid; place-items: center; padding: 0 12px; border: 1.5px solid #E2DDD8; border-right: 0; border-radius: 10px 0 0 10px; background: #F7F4F1; font: 600 14px var(--b); color: var(--muted); }
.ap-pre input { border-radius: 0 10px 10px 0 !important; }
.ap-err { min-height: 0; font: 500 12.5px/1.35 var(--b); color: #C62828; }
.ap-field.has-err input, .ap-field.has-err select, .ap-field.has-err .ap-drop, .ap-field.has-err .ap-pre span { border-color: #E57373 !important; }
.ap-cv, .ap-form > .ap-field { margin-top: 16px; }
.ap-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 22px 16px; border: 2px dashed #E3C9BE; border-radius: 14px; background: #FFF8F3; text-align: center; cursor: pointer; transition: background .2s, border-color .2s; }
.ap-drop:hover, .ap-drop:focus-visible, .ap-drop.is-over { background: #FFEFE3; border-color: var(--orange); outline: none; }
.ap-drop svg { width: 30px; height: 30px; color: var(--orange); }
.ap-drop-t { font: 500 14.5px var(--b); color: var(--ink-2); }
.ap-drop-t b { color: var(--red); }
.ap-drop-s { font: 400 12.5px var(--b); color: var(--muted); }
.ap-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid #CFE8D6; border-radius: 12px; background: #F2FAF4; }
.ap-file svg { flex: none; width: 26px; height: 26px; color: #2E7D4F; }
.ap-fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 14px var(--b); color: var(--ink); }
.ap-fs { font: 400 12.5px var(--b); color: var(--muted); }
.ap-rm { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #fff; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.ap-rm:hover { color: #C62828; }
.ap-consent label { display: flex; gap: 10px; align-items: flex-start; font: 400 13.5px/1.5 var(--b); color: var(--ink-2); cursor: pointer; }
.ap-consent input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--orange); }
.ap-consent a { color: var(--red); text-decoration: underline; }
.ap-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.ap-foot { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.ap-prog { height: 6px; border-radius: 6px; background: #F1E7E2; overflow: hidden; }
.ap-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--orange), #FFB36B); transition: width .2s; }
.ap-form-err { margin: 0; font: 500 13.5px var(--b); color: #C62828; }
.ap-form-err:empty { display: none; }
.ap-go { align-self: flex-start; min-width: 230px; justify-content: center; }
.ap-go.is-busy { opacity: .7; pointer-events: none; }
.ap-done { padding: 54px 34px 40px; text-align: center; }
.ap-tick { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: #E8F5EC; color: #2E7D4F; }
.ap-tick svg { width: 38px; height: 38px; }
.ap-done h2 { font: 800 26px/1.2 var(--h); color: var(--ink); margin: 0 0 10px; }
.ap-done p { max-width: 480px; margin: 0 auto 10px; font: 400 15.5px/1.65 var(--b); color: var(--ink-2); }
.ap-done .ap-ref { margin: 18px auto 24px; padding: 12px 16px; display: block; width: fit-content; border-radius: 10px; background: #FFF4EC; color: var(--ink-2); font-size: 14px; }
.ap-done .ap-ref b { display: block; margin-top: 4px; font: 800 20px var(--h); letter-spacing: .04em; color: var(--red); }
.ap-done .ap-x { color: var(--muted); background: #F3EFEC; }

/* "Don't see your role?" row under the job list */
.job-general { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; padding: 22px 26px; border: 1.5px dashed #E3C9BE; border-radius: 18px; background: #FFF8F3; }
.job-general p { margin: 0; font: 600 16px/1.4 var(--h); color: var(--ink); }
.job-general p span { display: block; margin-top: 4px; font: 400 14px var(--b); color: var(--muted); }
.job-general .btn { border: 1.5px solid var(--red); color: var(--red); background: #fff; }
.job-general .btn:hover { background: var(--red); color: #fff; }

@media (max-width: 640px) {
  .apply-modal { width: 100%; max-width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
  .ap-head { padding: 22px 60px 18px 18px; }
  .ap-form { padding: 18px 18px 24px; }
  .ap-grid { grid-template-columns: 1fr; gap: 12px; }
  .ap-go { align-self: stretch; }
  .job-general { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { .apply-modal[open] { animation: none; } }

/* hero "Send Your CV" is a <button>: drop the browser's default grey fill */
button.btn-outline-white { background: transparent; }
button.btn-outline-white:hover { background: rgba(255, 255, 255, .1); }
