:root {
  --modal-overlay: rgba(0, 0, 0, 0.4);
  --modal-stroke: #5b2206;
  --modal-title-from: #ffda59;
  --modal-title-to: #e6a200;
  --modal-cta-text: #fff;
  --modal-cta-stroke: rgba(0, 85, 7, 0.46);
  --modal-timer-color: rgba(153, 73, 48, 1);
  --font-sans: Arial, sans-serif;

  --text-title: clamp(1.4rem, 5vw, 3rem);
  --text-subtitle: clamp(0.85rem, 2.5vw, 1.2rem);
  --text-timer: clamp(0.9rem, 3vw, 1.5rem);
  --text-cta: clamp(1rem, 4vw, 2rem);
}

.success-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.success-modal-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(900px, 95vw);
  aspect-ratio: 1323 / 730;
  max-height: 90vh;
  height: auto;
}

.success-modal-content {
  width: 100%;
  border: 25px solid transparent;
  border-image: url(../img/popup/bg.png) 0 fill;
  box-sizing: border-box;
  z-index: 1000;
  padding: 9% 10% 7% 31%;
  aspect-ratio: 1323 / 730;
  height: auto;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 5px;
  right: 3%;
  width: clamp(40px, 6vw, 80px);
  background-color: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.close-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.countdown {
  position: absolute;
  height: clamp(70px, 15vw, 130px);
  left: 50%;
  transform: translateX(-50%);
  top: -10px;
  aspect-ratio: 605 / 238;
  border: 25px solid transparent;
  border-image: url(../img/popup/retangulo.png) 0 fill;
  box-sizing: border-box;
  z-index: -9;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 20px);
  padding-bottom: 22px;
}

.countdown img {
  width: clamp(18px, 4vw, 35px);
  object-fit: contain;
  object-position: center;
}

.countdown_timer {
  font-size: var(--text-timer);
  font-weight: 900;
  color: var(--modal-timer-color);
  text-align: center;
}

.success-modal-content h1 {
  font-family: var(--font-sans);
  font-size: var(--text-title);
  font-weight: 900;
  text-align: center;
  background: linear-gradient(var(--modal-title-from), var(--modal-title-to));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.15rem var(--modal-stroke);
  paint-order: stroke fill;
  margin-bottom: clamp(5px, 2vw, 20px);
}

.success-modal-content p {
  font-family: var(--font-sans);
  font-size: var(--text-subtitle);
  font-weight: 400;
  color: var(--modal-stroke);
  text-align: center;
}

.success-modal-content p strong {
  font-weight: 900;
}

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 1.5vw, 10px);
  width: 100%;
  max-width: 312px;
  aspect-ratio: 433 / 132;

  background-image: url(../img/popup/whatsapp-btn.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  margin: clamp(10px, 2vw, 20px) auto 0;
}

.btn-whatsapp img {
  width: clamp(30px, 8vw, 70px);
  object-fit: contain;
  object-position: center;
}

.btn-whatsapp span {
  font-family: var(--font-sans);
  font-size: var(--text-cta);
  font-weight: 900;
  color: var(--modal-cta-text);
  -webkit-text-stroke: 0.15rem var(--modal-cta-stroke);
  paint-order: stroke fill;
}

@media (max-width: 800px) {
  .success-modal-content {
    padding: 8% 5% 6% 22%;
  }

  .btn-whatsapp {
    max-width: 60%;
  }
}

/* <= 768 */
@media (max-width: 768px) {
  .success-modal-content {
    padding: 7% 11% 5% 33%;
  }
}

/* <= 640 */
@media (max-width: 640px) {
  .success-modal-content h1 {
    -webkit-text-stroke: 0.1rem var(--modal-stroke);
    margin-bottom: 0;
  }

  .countdown {
    min-width: 200px;
    height: 100px;
    padding-bottom: 20px !important;
    /* align-items: flex-end; */
  }
}

/* <= 480 */
@media (max-width: 480px) {
  .close-btn {
    top: 0;
    right: 0;
  }

  .btn-whatsapp span {
    font-size: calc(var(--text-cta) - 5px);
  }
  
  .success-modal-content {
    padding: 8% 10% 3% 32%;
  }

  .success-modal-content h1 {
    -webkit-text-stroke: 0.1rem var(--modal-stroke);
  }
}
