/* ============================================================================
   SmartPalm public site — careers pages (SMARTPALM careers 2026-09-24).
   Loaded after site.css on /careers, /careers/<id>-<slug> and the apply pages
   only (layout.php, $page_css). Uses site.css tokens; adds job rows, the key
   facts panel and the application form.
   ========================================================================= */

.c-hero h1 { max-width: 22ch; }
.c-hero-sm { padding: clamp(40px, 5vw, 64px) 0; }
.c-hero-sm h1 { font-size: clamp(30px, 3.6vw, 46px); }

/* ---------- tags (type, place, team) ---------- */
.c-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 14px; padding: 0; }
.c-tag {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 12px;
  border-radius: 999px; background: #eef1f7; color: var(--s-ink); font-size: 13.5px; font-weight: 600;
}
.c-tag .s-i { width: 16px; height: 16px; color: var(--s-quiet); }
.c-tag-type { background: #e9f3ee; color: var(--s-accent-dark); }
.c-tags-hero { margin: 20px 0 0; }
.c-tags-hero .c-tag { background: #fff; }
.c-tags-hero .c-tag-type { background: #e9f3ee; }

/* ---------- list of positions ---------- */
.c-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 22px; }
.c-head .s-count { margin: 0; }
.c-jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.c-job {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px clamp(20px, 3vw, 48px); align-items: center;
  padding: clamp(20px, 2.4vw, 30px); border: 1px solid var(--s-line); border-radius: 20px; background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.c-job:hover { border-color: transparent; box-shadow: 0 26px 54px -30px rgba(11,27,69,.45); transform: translateY(-2px); }
.c-job h3 { font-size: clamp(19px, 1.6vw, 23px); font-weight: 700; }
.c-job h3 a { color: var(--s-ink); text-decoration: none; }
.c-job h3 a:hover { color: var(--s-accent); }
.c-job-pos { margin: 4px 0 0; color: var(--s-quiet); font-size: 15px; font-weight: 600; }
.c-job-sum { margin: 10px 0 0; font-size: 15.5px; max-width: 70ch; }
.c-job-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; text-align: right; }
.c-job-dates { display: flex; flex-direction: column; gap: 2px; margin: 0; color: var(--s-quiet); font-size: 14px; }
.c-job-dates span:last-child { color: var(--s-ink); font-weight: 600; }

/* ---------- empty state ---------- */
.c-empty {
  display: flex; gap: clamp(18px, 2.4vw, 30px); align-items: flex-start;
  padding: clamp(26px, 3.4vw, 48px); border-radius: 24px; background: var(--s-panel);
}
.c-empty h2 { font-size: clamp(24px, 2.4vw, 32px); }
.c-empty p { margin: 12px 0 0; max-width: 60ch; font-size: 17px; }
.c-empty .s-hero-actions { margin-top: 24px; }

/* ---------- one position ---------- */
.c-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(28px, 4vw, 64px); align-items: start; }
.c-h2 { margin: 34px 0 14px; font-size: clamp(21px, 1.8vw, 26px) !important; font-weight: 800; }
.c-detail-body > .c-h2:first-child, .c-detail-body > .c-closed + .c-h2 { margin-top: 0; }
.c-prose { font-size: 17px; line-height: 1.75; color: #2f3a52; }
.c-prose h3 { font-size: 19px; margin: 24px 0 8px; }
.c-skills { list-style: none; padding: 0; }
.c-closed { align-items: center; margin-bottom: 28px; }
.c-closed .s-i { color: var(--s-accent); }
.c-apply-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px;
  margin-top: 40px; padding: clamp(22px, 2.6vw, 32px); border-radius: 20px;
  background: linear-gradient(150deg, #0b1b45 0%, #123a63 60%, #0f6d48 100%); color: #cfdaf0;
}
.c-apply-band h2 { color: #fff; font-size: 24px; }
.c-apply-band p { margin: 6px 0 0; }

.c-facts { position: sticky; top: 96px; padding: 24px; border-radius: 20px; background: var(--s-panel); }
.c-facts-title { margin: 0 0 16px; font-size: 13px !important; font-weight: 700 !important; letter-spacing: .1em; text-transform: uppercase; color: var(--s-quiet) !important; }
.c-facts .s-dl > div { padding: 12px 0; }
.c-facts .s-dl dd { font-size: 16px; }
.c-facts-btn { width: 100%; margin-top: 20px; }
.c-facts-back { margin-top: 16px; min-height: 44px; }

/* ---------- application form ---------- */
.c-apply-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 4vw, 64px); align-items: start; }
.c-apply-wrap > .c-done:not([hidden]) { grid-column: 1 / -1; }
.c-form { min-width: 0; padding: clamp(22px, 3vw, 40px); border: 1px solid var(--s-line); border-radius: 22px; background: #fff; }
.c-form-note { margin: 0 0 20px; color: var(--s-quiet); font-size: 14.5px; }
.c-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 22px; }
.c-f-wide { grid-column: 1 / -1; }
.c-grid > .c-h2 { margin: 12px 0 0; font-size: 19px !important; }
.c-field { min-width: 0; }
.c-field > label, .c-field legend { display: block; margin-bottom: 7px; color: var(--s-ink); font-size: 15px; font-weight: 600; }
.c-field fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.c-field legend { padding: 0; }
.c-req { color: #b3261e; }
.c-opt { color: var(--s-quiet); font-weight: 400; font-size: 13.5px; }
.c-field input[type=text], .c-field input[type=email], .c-field input[type=tel], .c-field input[type=date],
.c-field input[type=number], .c-field select, .c-field textarea {
  display: block; width: 100%; min-height: 48px; padding: 11px 14px;
  border: 1.5px solid #cfd4de; border-radius: 12px; background: #fff; color: var(--s-ink);
  font: inherit; font-size: 16px; line-height: 1.4; transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none; appearance: none;
}
.c-field select {
  padding-right: 40px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230b1b45' stroke-width='2'/%3E%3C/svg%3E") right 15px center / 12px 8px no-repeat;
}
.c-field textarea { min-height: 130px; resize: vertical; }
.c-field input:focus, .c-field select:focus, .c-field textarea:focus {
  outline: none; border-color: var(--s-accent); box-shadow: 0 0 0 4px rgba(26,138,90,.16);
}
.c-bad input, .c-bad select, .c-bad textarea, .c-bad .c-file-face { border-color: #b3261e !important; }
.c-err { margin: 7px 0 0; color: #b3261e; font-size: 14px; font-weight: 600; }
.c-hint { margin: 7px 0 0; color: var(--s-quiet); font-size: 14px; }

.c-checks { display: flex; flex-wrap: wrap; gap: 10px; }
.c-check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; border: 1.5px solid #cfd4de; border-radius: 12px; cursor: pointer; color: var(--s-ink); font-size: 15px; }
.c-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--s-accent); flex: 0 0 auto; }
.c-check:has(input:checked) { border-color: var(--s-accent); background: #e9f3ee; }
.c-check:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(26,138,90,.2); }
.c-field[data-field="accept_terms_and_conditions"] .c-check { border: 0; padding: 0; }

.c-file { position: relative; }
.c-file input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.c-file-face {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 12px 10px 16px;
  border: 1.5px dashed #b9c0cf; border-radius: 14px; background: var(--s-panel); color: var(--s-quiet);
  transition: border-color .15s ease, background .15s ease;
}
.c-file-face .s-i { color: var(--s-accent); }
.c-file-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.c-file-btn { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: #fff; border: 1.5px solid #ccd1dc; color: var(--s-ink); font-size: 14px; font-weight: 600; }
.c-file:hover .c-file-face, .c-file input:focus-visible + .c-file-face { border-color: var(--s-accent); background: #fff; }
.c-file input:focus-visible + .c-file-face { box-shadow: 0 0 0 4px rgba(26,138,90,.16); }
.c-file-set .c-file-face { border-style: solid; border-color: var(--s-accent); background: #e9f3ee; }
.c-file-set .c-file-name { color: var(--s-ink); font-weight: 600; }

.c-alert { margin: 0 0 20px; padding: 14px 16px; border-radius: 12px; background: #fdecea; border-left: 4px solid #b3261e; color: #7a1c16; font-size: 15px; font-weight: 600; }
.c-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.c-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--s-line); }
.c-submit .s-btn { min-width: 210px; cursor: pointer; font-family: inherit; }
.c-submit .s-btn[disabled] { opacity: .7; cursor: progress; }
.c-submit p { margin: 0; color: var(--s-quiet); font-size: 14px; }

.c-done { display: flex; gap: 20px; align-items: flex-start; padding: clamp(24px, 3vw, 40px); border-radius: 22px; background: #e9f3ee; outline: none; }
.c-done h2 { font-size: clamp(24px, 2.4vw, 32px); }
.c-done p { margin: 10px 0 0; font-size: 17px; color: #22503c; }
.c-done .s-ibox { background: var(--s-accent); color: #fff; }
.c-apply-role { margin: -6px 0 8px; }
.c-apply-role a { color: var(--s-ink); font-size: 18px; font-weight: 700; text-decoration: none; }
.c-apply-role a:hover { color: var(--s-accent); }

/* ---------- responsive ---------- */
@media (max-width: 991px) {
  .c-detail, .c-apply-wrap { grid-template-columns: minmax(0, 1fr); }
  .c-facts { position: static; }
}
@media (max-width: 767px) {
  .c-job { grid-template-columns: minmax(0, 1fr); }
  .c-job-side { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; text-align: left; }
  .c-job-btn { flex: 1 1 100%; }
  .c-empty { flex-direction: column; }
  .c-grid { grid-template-columns: minmax(0, 1fr); }
  .c-submit .s-btn { width: 100%; }
  .c-apply-band .s-btn { width: 100%; }
  .c-tag { min-height: 32px; font-size: 14px; }
  .c-done { flex-direction: column; }
}

/* the success panel, alert and field errors wait hidden until needed (display rules above would override [hidden]) */
.c-done[hidden], .c-alert[hidden], .c-err[hidden] { display: none !important; }
