/* pages/offers.css */
/* ---------- Offers ---------- */
.offers-actionbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--space-12);
}

.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--space-16);
}

.offer-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: var(--space-12);
  min-width: 0;
  height: 100%;
  padding: var(--space-16);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--ok);
  border-radius: var(--radius-8);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.offer-card:hover {
  background: var(--bg-elevated);
}
.offer-card.off {
  border-left-color: var(--text-muted);
}

.offer-card__top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-10);
}
.offer-card__pills {
  display: flex;
  gap: var(--space-6);
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  max-width: 100%;
}
/* Badges live on their own row, so they never reduce the title's line box. */
.offer-card__top > div { min-width: 0; width: 100%; }

/* Vacancies → mapping column: show the offer's RU name, truncated with ellipsis
   so a long «Voxys · Оператор колл-центра удаленно» stays one tidy pill; full
   slug in the title tooltip. Keep the pill's inline-flex + status dot; the inner
   span is the flex item that shrinks (min-width:0) and ellipsizes, leaving the
   dot and any «+N» fan counter always visible. */
.pill.vac-offer-pill { max-width: 260px; }
.vac-offer-pill__txt {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.offer-card__name {
  margin: 0;
  font-size: var(--fs-section);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  line-height: 1.25;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}
.offer-card__slug {
  display: block;
  margin-top: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.offer-card__commercial {
  display: flex; align-items: center; gap: var(--space-6); flex-wrap: wrap;
  margin-top: var(--space-6); color: var(--accent-soft-text);
  font-size: var(--fs-small); font-weight: var(--fw-medium);
}
.offer-card__commercial span { color: var(--text-muted); }

.offer-card__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-8);
  align-self: end;
  padding-top: var(--space-12);
  border-top: 1px solid var(--border-subtle);
}
.offer-card__metric {
  display: grid;
  row-gap: var(--space-4);
  min-width: 0;
}
.offer-card__metric > span {
  color: var(--text-muted);
  font-size: var(--fs-label);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.offer-card__metric strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: var(--fw-bold);
  font-size: var(--fs-secondary);
  overflow-wrap: break-word;
  word-break: normal;
}

@media (max-width: 480px) {
  .offer-card__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.offer-card--new {
  display: grid;
  place-items: center;
  min-height: 140px;
  padding: var(--space-16);
  background: transparent;
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-8);
  color: var(--accent-soft-text);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}
.offer-card--new:hover {
  border-color: var(--accent-soft-border);
  color: var(--text-primary);
  background: var(--accent-soft-bg);
}

/* ---------- Offer Editor (fullscreen overlay) ---------- */
.view.fullscreen {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay); /* Tails C-a11y-z: literal match — this IS the "fullscreen overlay" per the comment above; now correctly above .bottom-tab-bar (1200 > 1100) instead of tied with it at 100 */
  background: var(--bg-canvas);
  display: flex;
  flex-direction: column;
}
.view.fullscreen[hidden] {
  display: none;
}
