/* TakeLoot blended-image offer card. All selectors are tl-prefixed. */
.tl-offer-card {
  --tl-offer-text-color: #ffffff;

  position: relative;
  display: block;
  isolation: isolate;
  box-sizing: border-box;
  width: 8.75rem;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #333;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  color: #fff;
  cursor: pointer;
}

/* Light background: use dark text */
.tl-offer-card.tl-offer-card-light-bg {
  --tl-offer-text-color: #111222;
}

.tl-offer-card-img {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 66.6667%;
  min-height: 0 !important;
  object-fit: cover;
  object-position: center;
  border: 0;
  border-radius: 0;
  transition:
    filter 0.25s ease,
    transform 0.25s ease;
}

.tl-offer-card-overlay {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 100%;
  height: 60%;
  flex-direction: column;
  justify-content: flex-end;
  /* Safe fallback while the image loads or if canvas sampling is blocked. */
  background: linear-gradient(
    to bottom,
    rgba(26, 27, 38, 0) 0%,
    rgba(26, 27, 38, 0.96) 45%,
    rgba(26, 27, 38, 1) 100%
  );
  pointer-events: none;
}

.tl-offer-card-content {
  position: relative;
  z-index: 3;
  min-width: 0;
  padding: 0.5rem;
  color: var(--tl-offer-text-color, #ffffff);
}

.tl-offer-card-content h3 {
  display: -webkit-box;
  margin: 0 0 5px;
  overflow: hidden;
  color: inherit;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1rem;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tl-offer-card-points {
  display: flex;
  align-items: baseline;
  gap: 0;
  margin: 0;
  overflow: hidden;
  color: var(--tl-offer-text-color, #ffffff);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.tl-offer-card-cents {
  align-self: baseline;
  font-size: 0.8125rem;
  line-height: 1;
}

.tl-offer-card-coins {
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9375rem;
}

.tl-offer-card-coin-icon {
  display: inline-block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  object-fit: contain;
}

.tl-offer-card-badges {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  max-width: calc(100% - 16px);
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(7, 8, 9, 0.62);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.tl-offer-card-badges-inner {
  display: flex;
  height: 18px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.tl-offer-card-device-icon {
  color: #fff;
  font-size: 0.8rem;
  line-height: 1;
}

.tl-offer-card-provider-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 4px;
  object-fit: contain;
}

.tl-offer-card-play {
  position: absolute;
  top: 33.3333%;
  left: 50%;
  z-index: 4;
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(var(--bs-primary-rgb, 153, 68, 255), 0.42);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.92);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
  pointer-events: none;
}

.tl-offer-card:hover .tl-offer-card-img {
  filter: blur(1px) brightness(0.55);
}

.tl-offer-card:hover .tl-offer-card-play,
.tl-offer-card:focus-visible .tl-offer-card-play {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.tl-offer-card:focus-visible {
  outline: 2px solid var(--bs-primary, #9944ff);
  outline-offset: 2px;
}

/* The existing Swiper wrapper sets the desktop/mobile card width. */
.swiper-offer .swiper-offer-card > .tl-offer-card {
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .tl-offer-card-img,
  .tl-offer-card-play {
    transition: none;
  }
}
