/*
  The prize card of the design ("cardforwinning", 302 x 415). Its parts are placed with the coordinates of the Figma
  frame, the red outlines are the vectors exported from there (img/roll).
*/
.winning-card {
  position: relative;
  box-sizing: border-box;
  width: 302px;
  height: 415px;
  background: var(--surface-secondary);
  border: 3px solid var(--card-red);
  border-radius: 16px;
  overflow: hidden;
  color: var(--text-primary);
}

/* the dialog shows it at 205 x 282, that is the whole card at 68 % */
.winning-card-small {
  position: relative;
  flex: none;
  width: 205.214px;
  height: 282px;
}

.winning-card-small .winning-card {
  transform: scale(0.6795);
  transform-origin: 0 0;
}

.winning-card-mini {
  cursor: not-allowed;
}

/* in the grid of the prizes it is 128 x 176, that is 42 % */
.winning-card-mini[data-index] {
  cursor: pointer;
}

.winning-card-mini[data-index]:hover {
  transform: translateY(-2px);
}

.winning-card-mini {
  flex: none;
  width: 128px;
  height: 175.894px;
}

.winning-card-mini .winning-card {
  transform: scale(0.4238);
  transform-origin: 0 0;
}

.winning-card-art {
  position: absolute;
  display: block;
}

.winning-card-art img {
  position: absolute;
  display: block;
}

.winning-card-frame {
  top: 59px;
  left: 24px;
  width: 247px;
  height: 260px;
}

.winning-card-frame img {
  top: -0.38%;
  left: -0.4%;
  width: 100.8%;
  height: 100.57%;
}

.winning-card-chevron {
  top: 286px;
  left: 57px;
  width: 172.277px;
  height: 44.839px;
}

.winning-card-chevron img {
  top: -5.01%;
  left: -0.64%;
  width: 101.34%;
  height: 109.45%;
}

.winning-card-tab {
  top: -5px;
  left: 57px;
  width: 186px;
  height: 39.5px;
}

.winning-card-tab img {
  top: -3.8%;
  left: 0;
  width: 99.71%;
  height: 107.6%;
}

.winning-card-winner,
.winning-card-prize {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  overflow: hidden;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.winning-card-winner {
  top: -3px;
  left: 70px;
  width: 159px;
  height: 37px;
  font-size: 16px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.winning-card-prize {
  top: 348px;
  left: 57px;
  width: 186px;
  height: 34px;
  font-size: 14px;
}

.winning-card-image {
  position: absolute;
  top: 94px;
  left: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 247px;
  height: 150px;
}

/* a light backdrop right behind the picture only, so a photo without a background shows up whether it is dark or white */
.winning-card-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: 247px;
  max-height: 139px;
  background: radial-gradient(circle at 50% 38%, #e3e6eb 0%, #b0b6bf 100%);
}

.winning-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  min-width: 32px;
  height: 32px;
  box-sizing: border-box;
  margin: 0;
  padding: 0 5px;
  place-items: center;
  background: var(--surface-primary);
  border: 1px solid var(--card-red);
  border-radius: 360px;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
}

/*
  The locked card of the prize grid (the "hidden" variant of the design): the same card, but a thin red inner border, a red
  bar on top, a dark hexagon with the number of the door in it and the red chevron below.
*/
/* not won yet: a bit faded, so it is clear that nobody can open it */
/* the card is not see-through (the snow behind the page would show), a white layer with a low opacity over it fades it */
.winning-card-locked::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #fff;
  opacity: 0.12;
  pointer-events: none;
}

.winning-card-locked::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--card-red);
  border-radius: 10px;
}

.winning-card-bar {
  position: absolute;
  top: 57px;
  left: 71px;
  width: 160px;
  height: 4px;
  background: var(--card-red);
  border-radius: 2px;
}

.winning-card-frame-locked {
  top: 68px;
  left: 27px;
  width: 249px;
  height: 261.489px;
}

.winning-card-frame-locked img {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.winning-card-chevron-locked {
  top: 295px;
  left: 57px;
  width: 172.277px;
  height: 44.839px;
}

.winning-card-chevron-locked img {
  top: -5.01%;
  left: -0.64%;
  width: 101.34%;
  height: 109.45%;
}

/* the lock in the corner of a locked card, where the won card has its number: a plain lock, no circle */
.winning-card-badge.winning-card-lock {
  top: 20px;
  left: 20px;
  min-width: 0;
  height: auto;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}

.winning-card-lock img {
  display: block;
  width: 40px;
  height: 40px;
}

.winning-card-number {
  position: absolute;
  top: 136px;
  left: 0;
  width: 100%;
  margin: 0;
  font-size: 94px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}
