/* Offer popup — boarding-pass motif (Wiedererkennung) */

.offer-popup {
  --offer-ink: #0c1c24;
  --offer-sea: #2f6f7e;
  --offer-sea-deep: #1f4f5a;
  --offer-amber: #b8873b;
  --offer-paper: #fffdf8;
  border: 0;
  padding: 0;
  margin: auto;
  max-width: min(26.5rem, calc(100vw - 1.75rem));
  width: 100%;
  background: transparent;
  color: var(--offer-ink);
  overflow: visible;
}

.offer-popup::backdrop {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(47, 111, 126, 0.28), transparent 55%),
    rgba(12, 28, 36, 0.58);
  backdrop-filter: blur(3px);
  animation: offer-backdrop-in 0.35s ease-out;
}

.offer-popup[open] {
  animation: offer-dialog-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.offer-popup__ticket {
  position: relative;
  display: grid;
  grid-template-columns: 2.35rem 1fr 4.1rem;
  background: var(--offer-paper);
  border-radius: 14px;
  box-shadow:
    0 22px 55px rgba(12, 28, 36, 0.35),
    0 0 0 1px rgba(47, 111, 126, 0.18);
  overflow: hidden;
}

.offer-popup__ticket::before,
.offer-popup__ticket::after {
  content: "";
  position: absolute;
  inset-inline: 2.35rem 4.1rem;
  height: 12px;
  background:
    radial-gradient(circle at 6px 0, transparent 6px, var(--offer-paper) 7px) 0 0 / 12px 12px repeat-x;
  pointer-events: none;
  z-index: 1;
}

.offer-popup__ticket::before {
  top: -1px;
  transform: scaleY(-1);
}

.offer-popup__ticket::after {
  bottom: -1px;
}

.offer-popup__close {
  position: absolute;
  top: 0.5rem;
  /* Nach dem teal Rail, oben in der Ticket-Fläche */
  inset-inline-start: 2.7rem;
  z-index: 3;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: rgba(12, 28, 36, 0.08);
  color: var(--offer-ink);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.offer-popup__close.is-hidden,
.offer-popup__close[hidden] {
  display: none !important;
}

.offer-popup__close.is-counting {
  cursor: default;
  pointer-events: none;
  background: rgba(47, 111, 126, 0.14);
  color: var(--offer-sea-deep);
  font-family: var(--font-display, Literata, Georgia, serif);
  font-size: 1.05rem;
  font-weight: 800;
  animation: offer-count-pulse 1s ease-in-out infinite;
}

.offer-popup__close.is-ready:hover {
  background: rgba(12, 28, 36, 0.14);
  transform: scale(1.05);
}

.offer-popup__close-count,
.offer-popup__close-x {
  display: none;
  line-height: 1;
}

.offer-popup__close.is-counting .offer-popup__close-count,
.offer-popup__close.is-ready .offer-popup__close-x {
  display: inline;
}

@keyframes offer-count-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .offer-popup__close.is-counting {
    animation: none;
  }
}

.offer-popup__rail {
  background: linear-gradient(180deg, var(--offer-sea-deep), var(--offer-sea));
  color: #e8f4f6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0.2rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.offer-popup__rail-dots {
  flex: 1;
  width: 2px;
  margin: 0.55rem 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 253, 249, 0.7) 0 3px,
    transparent 3px 8px
  );
}

.offer-popup__rail-code {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.offer-popup__body {
  position: relative;
  padding: 1.35rem 1.1rem 1.15rem;
  text-align: center;
}

.offer-popup__brand {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--offer-sea-deep);
  letter-spacing: 0.02em;
}

.offer-popup__stamp {
  position: absolute;
  top: 1.1rem;
  inset-inline-end: 0.7rem;
  width: 3.6rem;
  height: 3.6rem;
  border: 2px solid rgba(184, 135, 59, 0.75);
  border-radius: 50%;
  color: rgba(143, 103, 40, 0.9);
  font-family: var(--font-display, Literata, Georgia, serif);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-12deg);
  opacity: 0.92;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(184, 135, 59, 0.25);
  animation: offer-stamp-in 0.55s 0.2s both cubic-bezier(0.22, 1, 0.36, 1);
}

.offer-popup__title {
  margin: 0.35rem 0 0.55rem;
  font-family: var(--font-display, Literata, Georgia, serif);
  font-size: clamp(1.15rem, 3.6vw, 1.35rem);
  line-height: 1.45;
  color: var(--offer-ink);
  padding-inline-end: 2.2rem;
}

.offer-popup__lead {
  margin: 0 0 0.9rem;
  font-size: 0.92rem;
  line-height: 1.75;
  color: #4a5c66;
}

.offer-popup__chips {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  text-align: start;
}

.offer-popup__chips li {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 0.45rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: rgba(47, 111, 126, 0.07);
  border: 1px solid rgba(47, 111, 126, 0.12);
}

.offer-popup__chip-key {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--offer-sea-deep);
  letter-spacing: 0.02em;
}

.offer-popup__chip-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--offer-ink);
  line-height: 1.4;
}

.offer-popup__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #c9984a, var(--offer-amber) 40%, #8f6728);
  color: var(--offer-ink);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(184, 135, 59, 0.28);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.offer-popup__cta:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  color: var(--offer-ink);
}

.offer-popup__cta-arrow {
  font-size: 1.05rem;
  transition: transform 0.2s ease;
}

.offer-popup__cta:hover .offer-popup__cta-arrow {
  transform: translateX(-3px);
}

.offer-popup__fine {
  margin: 0.65rem 0 0;
  font-size: 0.72rem;
  line-height: 1.55;
  color: #6a7a82;
}

.offer-popup__stub {
  background:
    repeating-linear-gradient(
      180deg,
      rgba(12, 28, 36, 0.04) 0 2px,
      transparent 2px 5px
    ),
    linear-gradient(180deg, #f3ebe0, #ebe2d4);
  border-inline-start: 1.5px dashed rgba(12, 28, 36, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem 0.35rem;
}

.offer-popup__stub-label {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--offer-sea-deep);
}

.offer-popup__stub-num {
  font-family: var(--font-display, Literata, Georgia, serif);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--offer-ink);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.12em;
}

.offer-popup__barcode {
  width: 1.15rem;
  height: 3.4rem;
  margin-top: 0.35rem;
  background: repeating-linear-gradient(
    90deg,
    #0c1c24 0 1px,
    transparent 1px 3px,
    #0c1c24 3px 4px,
    transparent 4px 7px
  );
  opacity: 0.55;
}

@keyframes offer-dialog-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes offer-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes offer-stamp-in {
  from {
    opacity: 0;
    transform: rotate(-28deg) scale(1.25);
  }
  to {
    opacity: 0.92;
    transform: rotate(-12deg) scale(1);
  }
}

@media (max-width: 420px) {
  .offer-popup__ticket {
    grid-template-columns: 1.9rem 1fr 3.4rem;
  }

  .offer-popup__stamp {
    width: 3.1rem;
    height: 3.1rem;
    font-size: 0.64rem;
  }

  .offer-popup__title {
    padding-inline-end: 1.6rem;
  }
}

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