/* ============================================================================
 * PAGE — Jobs directory (candidate side)
 * ----------------------------------------------------------------------------
 * The candidate card is built here rather than from the generic card
 * component: it has a fixed internal structure — status, identity, a labelled
 * fact grid, a tinted contact block, an action row — and a card that is really
 * a small template of its own is clearer written out than assembled from
 * slots the component would have to grow to support.
 *
 * Chips and buttons are still the shared components; only the frame is local.
 * ========================================================================== */

/* .filter-bar WAS DUPLICATED HERE, rule for rule, from base.css — and the two
   copies had already drifted apart on one line. The shared one is the only one
   now, and the public site tunes it in layout.css. */

/* --------------------------------------------------------------------------
 * The card
 * ----------------------------------------------------------------------- */

.cand {
  display: flex;
  flex-direction: column;
  /* Fills the feed's grid cell, so a row of cards ends level regardless of
     which of them happen to have a headline or a contact block. */
  block-size: 100%;
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  transition: box-shadow var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease);
}

.cand:hover {
  box-shadow: var(--sh-3);
  border-color: var(--border-strong);
}

/* -- status row ------------------------------------------------------------ */

.cand__top {
  display: flex;
  /* Pushes the badge to the trailing edge on its own, with no empty spacer
     element needed on the leading side. */
  justify-content: flex-end;
  min-block-size: 22px;
  margin-block-end: var(--sp-2);
}

.cand__status {
  padding: 3px var(--sp-3);
  border-radius: var(--r-full);
  background: var(--success-soft);
  /* --success, not a "-ink" variant: the status tokens have no darker text
     pairing (only brand and accent do), and this is the same pairing
     .badge--success already uses. */
  color: var(--success);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  white-space: nowrap;
}

/* -- identity -------------------------------------------------------------- */

.cand__id {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-inline-size: 0;
}

.cand__id-text { min-inline-size: 0; }

.cand__name {
  /* Holds a name a USER typed, which may be Urdu or Arabic on a page laid out
     left-to-right — see .ugc in base.css. */
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cand__role {
  margin-block-start: 2px;
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}

.cand__headline {
  margin-block-start: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: var(--lh-snug);
  /* Two lines maximum: a long self-description would otherwise make one card
     three times the height of its neighbours. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* -- the labelled fact grid ------------------------------------------------ */

.cand__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-block: var(--sp-4) 0;
  padding-block-start: var(--sp-4);
  border-block-start: 1px solid var(--border);
}

.cand__fact { min-inline-size: 0; }

.cand__fact dt {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-muted);
}

.cand__fact dd {
  margin: 2px 0 0;
  font-size: var(--fs-sm);
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cand__quals { margin-block-start: var(--sp-3); }

/* -- contact --------------------------------------------------------------- */

.cand__contact {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-block-start: var(--sp-4);
  padding: var(--sp-3);
  background: var(--surface-sunken);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
}

.cand__contact-line {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-inline-size: 0;
}

.cand__contact-line .icon { color: var(--ink-muted); }

.cand__contact-line span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Shown to a signed-out visitor in place of the details — quieter than the
   real block, because it is an explanation rather than content. */
.cand__contact--locked {
  flex-direction: row;
  align-items: center;
  color: var(--ink-muted);
  font-size: var(--fs-xs);
}

/* -- actions --------------------------------------------------------------- */

.cand__actions {
  display: flex;
  gap: var(--sp-2);
  /* margin-block-start:auto pins the buttons to the bottom of the card, so
     they line up across a row whatever height the content above reached. */
  margin-block-start: auto;
  padding-block-start: var(--sp-4);
}

.cand__actions .btn { flex: 1 1 0; }

/* --------------------------------------------------------------------------
 * Service card — /services
 * --------------------------------------------------------------------------
 * Shares this stylesheet with the candidate card rather than getting its own:
 * both are a directory row in the same feed, at the same width, and a second
 * file would be a second place for the two to drift apart. What differs is
 * only the hierarchy — here the SERVICE is the heading and the person is the
 * line beneath, because somebody looking for a caterer is looking for catering
 * first and for Ahmed second.
 * ----------------------------------------------------------------------- */

.service-card__title {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
}

.service-card__title a { text-decoration: none; color: inherit; }
.service-card__title a:hover { text-decoration: underline; }

.service-card__meta {
  margin-block-start: 2px;
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}

.service-card__desc {
  margin-block-start: var(--sp-3);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  color: var(--ink-soft);
}

.service-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-block-start: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--ink-soft);
}

/* The price is the number people compare, so it carries the weight — and
   tabular figures so a column of cards lines up. */
.service-card__price {
  font-weight: var(--fw-semibold);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.service-card .chip-list { margin-block-start: var(--sp-3); }
.service-card .btn { margin-block-start: var(--sp-4); }

/* --------------------------------------------------------------------------
 * Event card — /events
 * --------------------------------------------------------------------------
 * The date block leads, and is the largest thing on the card. An event is a
 * WHEN before it is a what: somebody scanning this list is asking "is there
 * anything tonight", and that question should be answered before a single
 * title is read.
 * ----------------------------------------------------------------------- */

.event-card .card__body {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}

.event-card__when {
  flex: none;
  display: grid;
  justify-items: center;
  gap: 2px;
  min-inline-size: 64px;
  padding: var(--sp-2);
  border-radius: var(--r-md);
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
}

.event-card__day   { font-size: var(--fs-xl); font-weight: var(--fw-bold); line-height: 1; }
.event-card__month { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; }
.event-card__time  { font-size: var(--fs-xs); color: var(--ink-muted); }

/* --------------------------------------------------------------------------
 * One event's page
 * ----------------------------------------------------------------------- */

.event-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-4);
  margin: 0;
}

.event-facts dt {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-muted);
}

.event-facts dd {
  margin: 2px 0 0;
  font-weight: var(--fw-medium);
}

.event-description {
  margin-block-start: var(--sp-5);
  line-height: var(--lh-loose);
}

.rsvp-form {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.rsvp-form .field { margin-block-start: 0; flex: 0 1 160px; }
