Skip to content

A games launcher for GOG, Amazon and Epic Games for Linux, Windows and macOS.

3.7 KB
Raw Blame
.discountCard {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: none;
  background-color: transparent;
  color: var(--text-secondary);
  text-align: start;
  cursor: pointer;
  transition: transform 0.1s ease-in;
  animation: fade-in 0.1s ease-in;
}

/* Only the cover art is a rounded, shadowed card; the title and price sit as
   plain text on the page below it (no footer box). */
.discountCard__cover {
  border-radius: var(--space-3xs);
  overflow: hidden;
  box-shadow: 0px 0px 12px 4px #00000055;
}

.discountCard:hover,
.discountCard:focus-visible {
  transform: scale(1.05);
}

.discountCard:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.discountCard__image {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

/* Humble ships only landscape store art; render it in a wide box so it isn't
   cropped into a portrait box. */
.discountCard--landscape .discountCard__image {
  aspect-ratio: 16 / 9;
}

/* List view: cards become horizontal rows with a fixed-height thumbnail. */
.discountsScreen__grid--list .discountCard {
  flex-direction: row;
  align-items: stretch;
}

.discountsScreen__grid--list .discountCard:hover,
.discountsScreen__grid--list .discountCard:focus-visible {
  transform: none;
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.discountsScreen__grid--list .discountCard__cover {
  flex-shrink: 0;
  height: 92px;
}

/* Fixed row height, natural width — keeps each store's cover uncropped. */
.discountsScreen__grid--list .discountCard__image {
  height: 92px;
  width: auto;
  aspect-ratio: auto;
}

.discountsScreen__grid--list .discountCard__info {
  flex: 1;
  justify-content: center;
}

.discountCard__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: var(--success, #18ad57);
  color: var(--ink-on-success, #ffffff);
  font-weight: var(--bold);
  font-size: var(--text-md);
  padding: var(--space-3xs) var(--space-xs);
  border-radius: var(--space-3xs);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.discountCard__cover {
  position: relative;
}

.discountCard__storeIcon {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 2;
  display: grid;
  place-content: center;
  width: 28px;
  height: 28px;
  padding: var(--space-3xs);
  border-radius: var(--radius-sm);
  background: var(--background-darker);
  fill: var(--text-default);
}

.discountCard__storeIcon svg {
  width: 100%;
  height: 100%;
}

.discountCard__score {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-weight: var(--bold);
  font-size: var(--text-xs);
  padding: var(--space-3xs) var(--space-xs);
  border-radius: var(--space-3xs);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.discountCard__scoreStar {
  color: #ffc107;
  font-size: var(--text-md);
  line-height: 1;
}

.discountCard__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  padding: var(--space-2xs) 0 0;
}

.discountCard__title {
  font-size: var(--text-md);
  font-weight: var(--bold);
  color: var(--text-default);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discountCard__priceRow {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
  font-size: var(--text-xs);
}

.discountCard__basePrice {
  text-decoration: line-through;
  color: var(--text-log, var(--text-secondary));
  opacity: 0.7;
}

.discountCard__finalPrice {
  color: var(--text-success, var(--success, #18ad57));
  font-weight: var(--bold);
  font-size: var(--text-md);
}