.mexico-promo:not([open]) {
  display: none;
}

.mexico-promo-trigger {
  appearance: none;
  padding: 0 !important;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mexico-promo-trigger:focus-visible {
  border-radius: 8px;
  outline: 3px solid #f4c542;
  outline-offset: 4px;
}

.mexico-promo {
  box-sizing: border-box;
  width: min(620px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  margin: auto;
  padding: 48px 12px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  background: transparent;
  color: #173e35;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.mexico-promo[open] {
  animation: mexico-promo-enter 300ms cubic-bezier(.2, .8, .2, 1) both;
}

.mexico-promo::backdrop {
  background: rgb(4 39 31 / 78%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: mexico-promo-backdrop 220ms ease-out both;
}

.mexico-promo__card {
  position: relative;
  isolation: isolate;
  border: 4px solid #075b46;
  border-radius: 32px;
  background:
    radial-gradient(circle at 10% 94%, rgb(244 197 66 / 13%) 0 55px, transparent 56px),
    radial-gradient(circle at 91% 12%, rgb(206 17 38 / 8%) 0 46px, transparent 47px),
    #fff9e8;
  padding: 74px clamp(24px, 6vw, 48px) 28px;
  box-shadow:
    12px 12px 0 #063c32,
    0 28px 70px rgb(0 0 0 / 32%);
  text-align: center;
}

.mexico-promo__papel {
  position: absolute;
  z-index: -1;
  top: 20px;
  right: 24px;
  left: 24px;
  display: flex;
  justify-content: space-between;
  border-top: 2px solid rgb(7 91 70 / 35%);
  padding-inline: 6px;
}

.mexico-promo__papel span {
  width: 34px;
  height: 25px;
  background: #006847;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 76% 100%, 50% 76%, 24% 100%, 0 70%);
  opacity: .9;
}

.mexico-promo__papel span:nth-child(3n + 2) {
  background: #f4c542;
}

.mexico-promo__papel span:nth-child(3n) {
  background: #ce1126;
}

.mexico-promo__badge {
  position: absolute;
  z-index: 2;
  top: -55px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border: 5px solid #075b46;
  border-radius: 50%;
  background: #f4d500;
  box-shadow: 8px 8px 0 #063c32;
  transform: translateX(-50%);
}

.mexico-promo__badge span {
  font-size: 48px;
  line-height: 1;
  transform: rotate(-6deg);
}

.mexico-promo__close {
  position: absolute;
  z-index: 3;
  top: 22px;
  right: 22px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  min-inline-size: 44px;
  min-block-size: 44px;
  padding: 0;
  border: 3px solid #075b46;
  border-radius: 50%;
  background: #fffdf4;
  color: #075b46;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.mexico-promo__close span,
.mexico-promo__close span::before,
.mexico-promo__close span::after {
  display: block;
}

.mexico-promo__close span {
  position: relative;
  width: 18px;
  height: 18px;
}

.mexico-promo__close span::before,
.mexico-promo__close span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.mexico-promo__close span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.mexico-promo__close span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.mexico-promo__close:hover {
  background: #ce1126;
  color: #fff;
  transform: rotate(4deg) scale(1.05);
}

.mexico-promo__eyebrow {
  display: inline-flex;
  margin: 0 0 20px;
  border: 3px solid #075b46;
  border-radius: 999px;
  background: #f4d500;
  padding: 9px 22px;
  color: #075b46;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-1deg);
}

.mexico-promo__title {
  margin: 0 auto 18px !important;
  max-width: 480px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #171916 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: clamp(34px, 6.5vw, 48px) !important;
  font-weight: 950 !important;
  letter-spacing: -.045em !important;
  line-height: .98 !important;
  text-transform: none !important;
}

.mexico-promo__description {
  max-width: 480px;
  margin: 0 auto 26px;
  color: #59645f;
  font-size: clamp(17px, 2.6vw, 21px);
  font-weight: 600;
  line-height: 1.45;
}

.mexico-promo__code {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  width: 100%;
  min-height: 112px;
  margin: 0 0 26px;
  padding: 20px 26px;
  border: 3px dashed #075b46;
  border-radius: 22px;
  background: #fff;
  color: #075b46;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.mexico-promo__code:hover {
  border-color: #ce1126;
  background: #fff4c7;
  transform: translateY(-2px);
}

.mexico-promo__code-copy {
  display: grid;
  gap: 6px;
}

.mexico-promo__code-label {
  color: #686b70;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mexico-promo__copy-status {
  color: #075b46;
  font-size: 15px;
  font-weight: 800;
}

.mexico-promo__code strong {
  color: #075b46;
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 950;
  letter-spacing: .12em;
  line-height: 1;
}

.mexico-promo__code.is-copied {
  border-color: #006847;
  background: #e9f7eb;
}

.mexico-promo__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 74px;
  border-radius: 20px;
  background: #075b46;
  color: #fff !important;
  padding: 16px 26px;
  box-shadow: 7px 7px 0 #ce1126;
  font-size: clamp(17px, 3vw, 21px);
  font-weight: 900;
  line-height: 1.15;
  text-decoration: none !important;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.mexico-promo__cta:hover {
  background: #006847;
  box-shadow: 4px 4px 0 #ce1126;
  color: #fff !important;
  transform: translate(3px, 3px);
}

.mexico-promo__arrow {
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.mexico-promo__note {
  margin: 20px 0 0;
  color: #6c716e;
  font-size: 12px;
  line-height: 1.4;
}

.mexico-promo__close:focus-visible,
.mexico-promo__code:focus-visible,
.mexico-promo__cta:focus-visible {
  outline: 3px solid #ce1126;
  outline-offset: 4px;
}

@keyframes mexico-promo-enter {
  from {
    opacity: 0;
    transform: translateY(22px) scale(.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes mexico-promo-backdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 520px) {
  .mexico-promo {
    padding: 42px 8px 12px;
  }

  .mexico-promo__card {
    border-radius: 24px;
    padding: 66px 18px 22px;
    box-shadow:
      7px 7px 0 #063c32,
      0 20px 48px rgb(0 0 0 / 30%);
  }

  .mexico-promo__papel {
    right: 16px;
    left: 16px;
  }

  .mexico-promo__papel span {
    width: 25px;
    height: 20px;
  }

  .mexico-promo__badge {
    top: -48px;
    width: 88px;
    height: 88px;
    box-shadow: 5px 5px 0 #063c32;
  }

  .mexico-promo__badge span {
    font-size: 40px;
  }

  .mexico-promo__close {
    top: 16px;
    right: 16px;
  }

  .mexico-promo__eyebrow {
    padding: 8px 15px;
    font-size: 11px;
  }

  .mexico-promo__code {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
    padding: 18px;
    text-align: center;
  }

  .mexico-promo__code-copy {
    gap: 3px;
  }

  .mexico-promo__cta {
    min-height: 64px;
    border-radius: 16px;
    padding-inline: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mexico-promo[open],
  .mexico-promo::backdrop {
    animation: none;
  }

  .mexico-promo__close,
  .mexico-promo__code,
  .mexico-promo__cta {
    transition: none;
  }
}
