.heading-gift-card {
  font-size: 16px;
  text-align: center;
  position: absolute;
  margin-top: -30px;
}
#gift-cards {
  padding-top: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#gift-cards p.list-error {
  text-align: center;
}

main:has(#gift-cards .gift-card) {
  height: auto;
}

main:has(#gift-cards .gift-card) div:has(table.receipt) {
  padding-top: 50px;
}
.redeem-info-wrapper[data-show="false"] {
  display: none;
}

.gift-cards-wrapper {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  max-width: 563px;
  width: 100vw;
  transform: rotateX(180deg);
  /* Because of rotateX, some properties like padding-bottom, align-items work in reverse. */
  align-items: end;
  padding-bottom: 12px;
}
.gift-cards-wrapper.center {
  justify-content: center;
}
.gift-cards-wrapper .gift-card {
  transform: rotateX(180deg);
}

.purchased {
  flex-direction: column;
  align-items: center;
}

.gift-card {
  background-color: var(--background-color-default);
  margin-right: 10px;
  padding: 12px 6px;
  text-align: center;
  min-width: 168px;
  width: 168px;
  height: fit-content;
}
.redeem-code {
  width: 160px;
  overflow-wrap: break-word;
  text-transform: none;
}
.redeem-code p {
  text-transform: none;
}

.gift-card h3 {
  color: #fff;
}

.gift-card div.buttons {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  margin: 10px 0;
}
.gift-card div.buttons span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.gift-card div.buttons button {
  background-color: #80808020;
  border: none;
  color: #fff;
  cursor: pointer;
}
.gift-card img {
  box-sizing: border-box;
  width: 100%;
  height: auto;
  border: 2px solid #80808020;
  max-width: 168px;
  height: 110px;
}

.gift-card .pricing {
  display: flex;
  flex-direction: column;
}
.gift-card .pricing .available {
  color: #fff;
}
.gift-card .pricing div {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.redeem-info-wrapper {
  position: absolute;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background-color-default);
}
.redeem-info {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 563px;
  padding: 24px;
  border-collapse: collapse;
  border-color: gray;
  overflow-y: auto;
  z-index: 1;
}

.close-btn {
  position: absolute;
  top: 0;
  right: 0;
  cursor: pointer;
  color: #fff;
}

.claim-gift-card-btn[data-loading="true"] > span.action {
  display: none;
}
.claim-gift-card-btn[data-loading="true"] > span.loading {
  display: flex;
}
.claim-gift-card-btn[data-loading="true"] > span.loading svg {
  animation: rotate 1s linear infinite;
}
.claim-gift-card-btn[data-loading="false"] > span.action {
  display: flex;
}
.claim-gift-card-btn[data-loading="false"] > span.loading {
  display: none;
}
.gift-cards-wrapper.purchased .claim-gift-card-btn {
  display: none;
}

#reveal-btn[data-loading-reveal="false"] .loading {
  display: none;
}
#reveal-btn[data-loading-reveal="false"] .action {
  display: block;
}

#reveal-btn[data-loading-reveal="true"] .loading {
  display: block;
}
#reveal-btn[data-loading-reveal="true"] .loading svg {
  animation: rotate 1s linear infinite;
}

#reveal-btn[data-loading-reveal="true"] .action {
  display: none;
}
.disclaimer {
  text-align: center;
  padding-top: 24px;
}

@media (prefers-color-scheme: light) {
  .gift-card,
  .redeem-info-wrapper {
    background-color: #fff;
  }
  .gift-card h3,
  .gift-card .pricing .available,
  .gift-card div.buttons button,
  .close-btn {
    color: #000;
  }
  .gift-card img {
    border-color: var(--light-mode-border-color);
  }
}
