/**
 * WAVE-16 D16-3 — Jobs cards / grid visual
 * Shadows · hover lift · badge chips · CTA row beauty
 * CSS-only · loads after board-dark + btn-system · no pay/auth
 * 2026-10-06
 */

/* -------------------------------------------------------------------------- */
/* Grid — hiring + looking equal rhythm                                       */
/* -------------------------------------------------------------------------- */
.rcl-job-grid.rcy-card-grid,
.rcy-card-grid.rcl-job-grid {
  display: grid;
  gap: 1rem;
  align-items: stretch;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
@media (min-width: 960px) {
  .rcl-job-grid.rcy-card-grid:not(.rcl-job-grid--looking),
  .rcy-card-grid.rcl-job-grid:not(.rcl-job-grid--looking) {
    grid-template-columns: repeat(auto-fill, minmax(286px, 1fr));
    gap: 1.15rem;
  }
  .rcl-job-grid--looking {
    gap: 1rem;
  }
}
@media (max-width: 640px) {
  .rcl-job-grid.rcy-card-grid,
  .rcy-card-grid.rcl-job-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
}

/* -------------------------------------------------------------------------- */
/* Card shell — layered shadow + hover lift                                   */
/* -------------------------------------------------------------------------- */
.rcl-job-card.rcl-job-card--feed,
article.rcl-job-card--feed {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 15.5rem;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1.5px solid rgba(232, 238, 247, 0.14);
  background: #162033;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 4px 14px rgba(0, 0, 0, 0.22),
    0 1px 3px rgba(0, 0, 0, 0.14);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}
.rcl-job-card--feed .rcy-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 0.2rem;
  padding: 1rem 1.05rem 1.05rem;
  box-sizing: border-box;
}
.rcl-job-card--feed:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 197, 24, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 42px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(245, 197, 24, 0.28),
    0 0 28px rgba(245, 197, 24, 0.12);
  background-image: linear-gradient(
    165deg,
    rgba(245, 197, 24, 0.08) 0%,
    transparent 44%
  );
}
.rcl-job-card--feed:focus-within {
  outline: none;
  border-color: rgba(245, 197, 24, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.3),
    0 0 0 3px rgba(245, 197, 24, 0.35);
}

/* Looking variant — warm yellow edge without fighting wave2 gradient */
.rcl-job-card--feed.rcl-job-card--looking {
  border-color: rgba(245, 197, 24, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 212, 0, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(245, 197, 24, 0.12);
}
.rcl-job-card--feed.rcl-job-card--looking:hover {
  border-color: rgba(255, 212, 0, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 212, 0, 0.12),
    0 18px 42px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 212, 0, 0.35),
    0 0 30px rgba(255, 212, 0, 0.14);
}

/* Cream / non-dark pages — warm soft shadow (A2 tokens) */
body.rcy-body:not(.rcl-theme-dark) .rcl-job-card--feed {
  background: #fffdf2;
  border-color: rgba(26, 31, 46, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 4px 14px rgba(26, 31, 46, 0.07),
    0 1px 3px rgba(26, 31, 46, 0.05);
}
body.rcy-body:not(.rcl-theme-dark) .rcl-job-card--feed:hover {
  border-color: rgba(245, 197, 24, 0.75);
  box-shadow:
    inset 0 1px 0 #fff,
    0 16px 36px rgba(26, 31, 46, 0.12),
    0 0 0 1px rgba(245, 197, 24, 0.35),
    0 8px 24px rgba(245, 197, 24, 0.18);
  background-image: none;
}

/* -------------------------------------------------------------------------- */
/* Top row + badge chips                                                      */
/* -------------------------------------------------------------------------- */
.rcl-job-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
  min-height: 1.55rem;
}
.rcl-job-card__top .rcl-pkg-badge,
.rcl-job-card--feed .rcl-pkg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  max-width: 100%;
  padding: 0.22rem 0.68rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  line-height: 1.2;
  border: 1.5px solid transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 0 rgba(0, 0, 0, 0.18);
}
.rcl-pkg-badge--free {
  background: linear-gradient(180deg, #ffe566 0%, #f5c518 100%);
  color: #1a1f2e;
  border-color: rgba(26, 31, 46, 0.2);
}
.rcl-pkg-badge--starter {
  background: linear-gradient(180deg, #ffd84a 0%, #e8b84a 100%);
  color: #1a1f2e;
  border-color: rgba(26, 31, 46, 0.22);
}
.rcl-pkg-badge--standard {
  background: linear-gradient(180deg, #f0b429 0%, #d4920a 100%);
  color: #1a1f2e;
  border-color: rgba(26, 31, 46, 0.28);
}
.rcl-pkg-badge--premium {
  background: linear-gradient(180deg, #2a3348 0%, #121820 100%);
  color: #ffe566;
  border-color: rgba(245, 197, 24, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 212, 0, 0.18),
    0 2px 0 rgba(0, 0, 0, 0.35),
    0 0 10px rgba(245, 197, 24, 0.2);
}
.rcl-pkg-badge--looking {
  background: linear-gradient(180deg, #ffe566 0%, #ffd400 100%);
  color: #121c2e;
  border-color: rgba(26, 31, 46, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 2px 0 rgba(0, 0, 0, 0.22);
}
.rcl-job-card__city {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  opacity: 0.92;
}
.rcl-looking-specialty {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

/* Pay + excerpt breathing room */
.rcl-job-card__pay {
  margin: 0.35rem 0 0.2rem;
}
.rcl-job-card--feed .rcy-card__title {
  margin: 0;
  line-height: 1.25;
}
.rcl-job-card--feed .rcy-card__excerpt {
  flex: 1 1 auto;
  margin: 0.35rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  font-size: 0.9rem;
}

/* -------------------------------------------------------------------------- */
/* CTA row beauty — pill equal-height actions                                 */
/* -------------------------------------------------------------------------- */
.rcl-job-card__actions.rcy-cta-row,
.rcl-job-card__actions {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(120, 160, 220, 0.2);
}
.rcl-job-card__actions .rcy-btn,
.rcl-job-card__actions a.rcy-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 42px;
  padding: 0.42rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  justify-content: center;
  white-space: nowrap;
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 2px 0 rgba(0, 0, 0, 0.22);
  transition:
    transform 140ms ease,
    box-shadow 160ms ease,
    filter 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}
.rcl-job-card__actions .rcy-btn:hover,
.rcl-job-card__actions a.rcy-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 6px 14px rgba(0, 0, 0, 0.28);
  filter: brightness(1.05);
}
.rcl-job-card__actions .rcy-btn:active,
.rcl-job-card__actions a.rcy-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 1px 0 rgba(0, 0, 0, 0.2);
}
.rcl-job-card__actions .rcl-cta--apply,
.rcl-job-card__actions a.rcl-cta--apply {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 2px 0 #1a1f2e,
    0 0 12px rgba(255, 212, 0, 0.22);
}
.rcl-job-card__actions .rcl-cta--call,
.rcl-job-card__actions a.rcl-cta--call {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 2px 0 #c94a30;
}
.rcl-job-card__actions .rcl-cta--details,
.rcl-job-card__actions a.rcl-cta--details {
  box-shadow:
    inset 0 1px 0 rgba(255, 212, 0, 0.18),
    0 2px 0 rgba(0, 0, 0, 0.35);
}

@media (max-width: 420px) {
  .rcl-job-card__actions.rcy-cta-row,
  .rcl-job-card__actions {
    flex-wrap: wrap !important;
    gap: 0.4rem;
  }
  .rcl-job-card__actions .rcy-btn,
  .rcl-job-card__actions a.rcy-btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-height: 44px;
  }
}

/* -------------------------------------------------------------------------- */
/* Reduced motion                                                             */
/* -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .rcl-job-card.rcl-job-card--feed,
  article.rcl-job-card--feed,
  .rcl-job-card__actions .rcy-btn,
  .rcl-job-card__actions a.rcy-btn {
    transition: none !important;
  }
  .rcl-job-card--feed:hover,
  .rcl-job-card--feed.rcl-job-card--looking:hover,
  .rcl-job-card__actions .rcy-btn:hover,
  .rcl-job-card__actions a.rcy-btn:hover,
  .rcl-job-card__actions .rcy-btn:active,
  .rcl-job-card__actions a.rcy-btn:active {
    transform: none !important;
  }
}
