/*
 * Promopoisk — vacancy card v3 (every listing UI v2 page: home, /vacancies,
 * landings, /bookmarks, /company). Loaded after listing-ui-v2.css (weight 55)
 * by promopoisk_v3_preprocess_page(). Markup: custom-listing--listing-block--item-v2.tpl.php.
 *
 * Style source: Promopoisk checklist guides (white sheet on sky, ink 800–900
 * headings, brand pastel chips). Chip colour = type of the attribute.
 * Analytics hooks (.pp-vacancy-card-v2, data-vacancy-id, the H2) and the
 * save/report controls are untouched.
 */

body.pp-listing-ui-v2 {
  --pp-card-ink: #070B24;
  --pp-card-text: #2B3445;
  --pp-card-muted: #485D78;
  --pp-card-line: #D9E6F6;
  --pp-card-blue: #0B62F4;
}

/* One sheet instead of a card inside a card. `.pp-refresh` is the theme's
   app wrapper on every page; it lifts this rule over the legacy
   `.page-front .pp-refresh .pp-vacancies-view .vacancies-item { padding }`. */
body.pp-listing-ui-v2 .pp-refresh .pp-vacancy-card-v2.vacancies-item {
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: none;
  box-shadow: none;
}

body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__body {
  height: 100%;
  min-height: 0;
  padding: 18px 18px 12px;
  border: 1px solid #E3ECF7;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(7, 11, 36, .04);
  transition: border-color .15s ease, box-shadow .15s ease;
}

body.pp-listing-ui-v2 .pp-vacancy-card-v2:hover .pp-vacancy-card-v2__body {
  border-color: #C7D8F0;
  box-shadow: 0 10px 28px rgba(23, 59, 114, .08);
}

body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__link {
  color: inherit;
  text-decoration: none;
}

body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__link:focus-visible {
  outline: 3px solid var(--pp-card-blue);
  outline-offset: 4px;
  border-radius: 10px;
}

/* Company line */
body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__company {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}

body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__company-name {
  font-family: 'Avenir Next Cyr', 'Avenir Next', 'AvenirNextCyr', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--pp-card-text);
}

body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__company-sub {
  font-size: 12px;
  color: var(--pp-card-muted);
}

/* Title: ink, 800, max 3 lines */
body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0 0 12px;
  font-family: 'Avenir Next Cyr', 'Avenir Next', 'AvenirNextCyr', Arial, sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--pp-card-ink);
}

/* Chips: pastel pair per attribute type, no icons */
body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__chips li {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 0;
  padding: 3px 10px;
  border: 0;
  border-radius: 10px;
  background: #EDF5FF;
  font-family: 'Avenir Next Cyr', 'Avenir Next', 'AvenirNextCyr', Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  color: #0B4FD6;
}

body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__chips li::before {
  content: none;
  display: none;
}

/* location — sky / blue */
body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__chips li.pp-chip--location { background: #EDF5FF; color: #0B4FD6; }
/* format (remote) — mint */
body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__chips li.pp-chip--remote { background: #DCF3E7; color: #136F46; }
/* employment / schedule — amber */
body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__chips li.pp-chip--employment { background: #FFF0D2; color: #8F5300; }
/* level / other — lavender */
body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__chips li.pp-chip--level { background: #EBE7FF; color: #5536B8; }

/* Salary: visible; "not specified" stays quiet */
body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__salary {
  display: block;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: 'Avenir Next Cyr', 'Avenir Next', 'AvenirNextCyr', Arial, sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--pp-card-ink);
}

body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__salary.is-empty {
  font-size: 13px;
  font-weight: 600;
  color: var(--pp-card-muted);
}

/* Footer: meta + save/report (controls untouched) */
body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #EEF3FA;
}

body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__meta {
  font-size: 12px;
  color: var(--pp-card-muted);
}

/* ---------- Company mark: initials on a brand tone (no uploaded logo) ---------- */

body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__mark.pp-company-mark {
  display: inline-flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #EEF3FA;
  box-shadow: none;
  color: #4D5F82;
  font-family: 'Avenir Next Cyr', 'Avenir Next', 'AvenirNextCyr', Arial, sans-serif;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__mark.pp-company-mark--two {
  font-size: 14px;
  letter-spacing: .02em;
}

body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-company-mark--tone-1 { background: #E3EFFF; color: #0B4FD6; }
body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-company-mark--tone-2 { background: #DCF4FB; color: #0A6688; }
body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-company-mark--tone-3 { background: #FFF0D2; color: #8F5300; }
body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-company-mark--tone-4 { background: #DCF3E7; color: #136F46; }
body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-company-mark--tone-5 { background: #EBE7FF; color: #5536B8; }
body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-company-mark--tone-6 { background: #FFE5DF; color: #A8381F; }

body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-company-mark--none {
  background: #EEF3FA;
  color: #627187;
}

body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-company-mark svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 767px) {
  body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__body { padding: 16px 16px 10px; }
  body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__title { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__body { transition: none; }
}

@media print {
  body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__body { box-shadow: none; border-color: #999; }
  body.pp-listing-ui-v2 .pp-vacancy-card-v2 .pp-vacancy-card-v2__mark.pp-company-mark { background: none; box-shadow: inset 0 0 0 1px #999; color: #000; }
}
