#discount-popup {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 220px;
  background-color: oklch(from var(--primary, #ff3d00) l c h / 0.8);
  text-align: center;
  font-size: 22px;
  color: var(--foreground, #000);
  padding: 10px;
  cursor: pointer;
  z-index: 998;
  transition: all 0.3s ease;
  /* border: 1px solid #facc15; */
  /* box-shadow: 5px 5px #facc15; */
  opacity: 0;
}

@media (max-width: 768px) {
  body:has(#buy-button-wrapper) #discount-popup {
    bottom: 146px !important;
  }
}

:is(#discount-popup, #discount-dialog-content) p {
  margin: 0;
}

#discount-message {
  font-size: 20px;
  font-weight: bold;
}

#discount-bar {
  width: 100%;
  height: 10px;
  background-color: oklch(from var(--primary, #ff3d00) l c h / 0.8);
  margin-top: 10px;
  overflow: hidden;
  /* border-radius: 5px; */
  display: flex;
  justify-content: start;
  align-items: center;
}

#discount-bar-inner {
  background-color: oklch(from var(--primary, #ff3d00) l c h / 0.8);
  width: 100%;
  height: 100%;
  transition: width 3s ease;
}

#discount-dialog {
  position: fixed;
  z-index: 1000;
  width: 100vw;
  height: 100dvh;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease;
  opacity: 0;
}

#discount-dialog-inner {
  background-color: oklch(from var(--primary, #fff) l c h / 0.7);
  /* padding: 20px; */
  /* top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  position: absolute; */
  margin: auto;
  display: flex;
  width: 90%;
  max-width: 450px;
}

#discount-dialog-content {
  text-align: center;
  padding: 30px;
  text-wrap: balance;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
  max-width: 450px;
  margin: 0 auto;
  position: relative;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform: scale(0.9);
  opacity: 0;
  font-family: var(--font-sans, fontbody);
}

@media (max-width: 768px) {
  #discount-dialog-content {
    padding: 15px;
  }
}

#discount-dialog-content :is(p, span, button) {
  font-family: var(--font-sans, fontbody);
}

#discount-dialog-content h2 {
  font-size: 24px;
  color: var(--foreground, #000);
  margin: 0;
  line-height: 1.2;
  font-weight: bold;
}

@media (max-width: 768px) {
  #discount-dialog-content h2 {
    font-size: 20px;
  }
}

#claim-heading-wrapper {
  overflow: hidden;
}

#discount-dialog-content .subheading {
  font-size: 16px;
  color: var(--muted-foreground, #333);
  margin: 0;
}

#countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin: 10px 0;
  background-color: oklch(from var(--primary, #ff3d00) l c h / 0.8);
  padding: 15px 10px;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.countdown-item span {
  font-size: 28px;
  font-weight: bold;
  color: var(--destructive-foreground, #fff);
  line-height: 1;
}

.countdown-item .label {
  font-size: 12px;
  text-transform: uppercase;
  margin-top: 5px;
  color: var(--destructive-foreground, #fff);
  opacity: 0.8;
}

.countdown-separator {
  font-size: 28px;
  font-weight: bold;
  color: var(--destructive-foreground, #fff);
  line-height: 1;
  margin-top: -10px;
}

#discount-email {
  padding: 12px;
  border: 2px solid var(--border, #ccc);
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
  background-color: var(--input, #fff);
  color: var(--foreground, #000);
}

#discount-submit {
  padding: 12px 20px;
  background-color: var(--foreground, #000);
  color: var(--background, #fff);
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 18px;
  font-weight: bold;
  text-transform: uppercase;
  width: 100%;
  position: relative;
}

#discount-submit:hover {
  background-color: var(--muted, #333);
  color: var(--muted-foreground, #fff);
}

#discount-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

#loading-indicator {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--destructive-foreground, #fff);
  border-radius: 50%;
  border-top: 2px solid var(--foreground, #000);
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#error-message {
  color: var(--destructive, #ff3d00);
  font-size: 14px;
  display: none;
}

#close-dialog {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground, #000);
}

#claim-text {
  font-size: 14px;
  color: white;
  font-weight: 400;
}

/* Checkmark animation */
.checkmark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: #4bb71b;
  stroke-miterlimit: 10;
  box-shadow: inset 0px 0px 0px #4bb71b;
  animation: fill 0.4s ease-in-out 0.4s forwards,
    scale 0.3s ease-in-out 0.9s both;
  margin: 0 auto 20px;
}

.checkmark__circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 4;
  stroke-miterlimit: 10;
  stroke: var(--background, #fff);
  fill: none;
}

.checkmark__check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke: var(--background, #fff);
}

@keyframes fill {
  100% {
    box-shadow: inset 0px 0px 0px 30px #4bb71b;
  }
}

@keyframes scale {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

/* Thank you message styles */
#discount-dialog-content .thank-you-list {
  text-align: left;
  margin: 20px 0;
  padding-left: 20px;
  list-style: none;
}

#discount-dialog-content .thank-you-list li {
  margin-bottom: 10px;
  font-size: 16px;
  color: var(--muted-foreground, #333);
}

#discount-dialog-content .closing-message {
  font-size: 16px;
  color: var(--muted-foreground, #666);
  margin-top: 20px;
}
