/* D:\projects\fanzanian\app\static\shared\work-card.css */
/* R5-A S3.2: one compact Work Card visual contract for Exploration, Catalog and LIKE work lists. */

.fz-work-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 11px;
  background: #111116;
  color: #f7f7fa;
  box-shadow: none;
}

.fz-work-card.is-grid { min-height: 0; }

.fz-work-card__media {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.fz-work-card__image {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  place-items: center;
  background: #15151a;
}

.fz-work-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: cover;
  object-position: center;
  transition: transform 180ms ease, opacity 180ms ease;
}

.fz-work-card__media:hover .fz-work-card__image img { transform: scale(1.018); }

.fz-work-card.is-mystery .fz-work-card__image img {
  filter: blur(15px) saturate(.45);
  transform: scale(1.12);
  opacity: .48;
}

.fz-work-card__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgba(255, 255, 255, .42);
  font-size: 11px;
  letter-spacing: .08em;
}

.fz-work-card__overlay {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  pointer-events: none;
}

.fz-work-card__badge,
.fz-work-card__state,
.fz-work-card__evidence-chip {
  display: inline-flex;
  max-width: 100%;
  min-height: 22px;
  align-items: center;
  padding: 4px 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(7, 7, 10, .80);
  color: rgba(255, 255, 255, .96);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.fz-work-card__state {
  margin-left: auto;
  background: rgba(230, 0, 18, .88);
}

.fz-work-card__evidence {
  position: absolute;
  z-index: 3;
  right: 7px;
  bottom: 7px;
  left: 7px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 5px;
  pointer-events: none;
}

.fz-work-card__progress {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, .16);
}

.fz-work-card__progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #9a72ff, #ff3f79);
}

.fz-work-card__copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  padding: 9px 9px 10px;
}

.fz-work-card__eyebrow {
  color: #c9baff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
}

.fz-work-card__headline {
  margin: 0;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.28;
}

.fz-work-card__title {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, .94);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.42;
  text-decoration: none;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

a.fz-work-card__title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fz-work-card__metadata {
  min-height: 0;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, .62);
  font-size: 10px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fz-work-card__metadata a {
  color: inherit;
  text-decoration-color: rgba(255, 255, 255, .28);
  text-underline-offset: 3px;
}

.fz-work-card__metadata a:hover { color: #fff; }
.fz-work-card__maker { color: rgba(255, 255, 255, .5); }

.fz-work-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
  padding-top: 3px;
}

.fz-work-card__actions:empty { display: none; }

.fz-work-card__primary-action,
.fz-work-card__secondary-action {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
  text-decoration: none;
}

.fz-work-card__primary-action {
  flex: 1 1 120px;
  border: 1px solid #fff;
  background: #fff;
  color: #101014;
}

.fz-work-card__secondary-action {
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

/* One responsive work-grid contract across all three work-card surfaces. */
.exploration-grid,
.catalog-page .catalog-grid,
.mylist-page .mylist-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.exploration-grid > .fz-work-card,
.catalog-page .catalog-grid > .fz-work-card,
.mylist-page .mylist-grid > .fz-work-card {
  width: 100%;
}

@media (min-width: 620px) {
  .exploration-grid,
  .catalog-page .catalog-grid,
  .mylist-page .mylist-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
}

@media (min-width: 900px) {
  .exploration-grid,
  .catalog-page .catalog-grid,
  .mylist-page .mylist-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .fz-work-card__title { font-size: 13px; }
  .fz-work-card__metadata { font-size: 11px; }
}

@media (max-width: 299px) {
  .exploration-grid,
  .catalog-page .catalog-grid,
  .mylist-page .mylist-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fz-work-card * { transition: none !important; }
}
