/* ═══════════════════════════════════════════════════════════════════════════
   Promotion Popup — base styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* Overlay */
.promo-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.promo-popup-overlay.promo-popup--visible {
  opacity: 1;
  visibility: visible;
}

/* Popup container */
.promo-popup {
  position: relative;
  z-index: 99999;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.35s ease;
}
.promo-popup-overlay.promo-popup--visible .promo-popup {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* ── Animations ─────────────────────────────────────────────────────────── */
.promo-popup--anim-fade .promo-popup {
  transform: none;
  opacity: 0;
}
.promo-popup--anim-fade.promo-popup--visible .promo-popup {
  opacity: 1;
}

.promo-popup--anim-slide_up .promo-popup {
  transform: translateY(60px);
}
.promo-popup--anim-slide_up.promo-popup--visible .promo-popup {
  transform: translateY(0);
}

.promo-popup--anim-slide_down .promo-popup {
  transform: translateY(-60px);
}
.promo-popup--anim-slide_down.promo-popup--visible .promo-popup {
  transform: translateY(0);
}

.promo-popup--anim-zoom .promo-popup {
  transform: scale(0.5);
}
.promo-popup--anim-zoom.promo-popup--visible .promo-popup {
  transform: scale(1);
}

.promo-popup--anim-bounce .promo-popup {
  transform: scale(0.3);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.3s ease;
}
.promo-popup--anim-bounce.promo-popup--visible .promo-popup {
  transform: scale(1);
}

.promo-popup--anim-none .promo-popup,
.promo-popup--anim-none.promo-popup--visible .promo-popup {
  transition: none;
  transform: none;
}

/* ── Positions ──────────────────────────────────────────────────────────── */
.promo-popup--pos-center {
  align-items: center;
  justify-content: center;
}
.promo-popup--pos-top_left {
  align-items: flex-start;
  justify-content: flex-start;
  padding: 2rem;
}
.promo-popup--pos-top_right {
  align-items: flex-start;
  justify-content: flex-end;
  padding: 2rem;
}
.promo-popup--pos-bottom_left {
  align-items: flex-end;
  justify-content: flex-start;
  padding: 2rem;
}
.promo-popup--pos-bottom_right {
  align-items: flex-end;
  justify-content: flex-end;
  padding: 2rem;
}
.promo-popup--pos-bottom_bar {
  align-items: flex-end;
  justify-content: stretch;
}
.promo-popup--pos-bottom_bar .promo-popup {
  width: 100%;
  max-width: 100vw;
  border-radius: 0 !important;
}
.promo-popup--pos-top_bar {
  align-items: flex-start;
  justify-content: stretch;
}
.promo-popup--pos-top_bar .promo-popup {
  width: 100%;
  max-width: 100vw;
  border-radius: 0 !important;
}

/* ── Layouts ────────────────────────────────────────────────────────────── */
.promo-popup__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Image left / right */
.promo-popup--layout-image_left .promo-popup__inner,
.promo-popup--layout-image_right .promo-popup__inner {
  flex-direction: row;
  align-items: stretch;
}
.promo-popup--layout-image_right .promo-popup__inner {
  flex-direction: row-reverse;
}
.promo-popup--layout-image_left .promo-popup__image,
.promo-popup--layout-image_right .promo-popup__image {
  flex: 0 0 45%;
  max-width: 45%;
}
.promo-popup--layout-image_left .promo-popup__content,
.promo-popup--layout-image_right .promo-popup__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem;
}

/* Image top */
.promo-popup--layout-image_top .promo-popup__image {
  max-height: 260px;
  overflow: hidden;
}

/* Full background */
.promo-popup--layout-image_bg {
  background-size: cover;
  background-position: center;
}
.promo-popup--layout-image_bg .promo-popup__image {
  display: none;
}
.promo-popup--layout-image_bg .promo-popup__content {
  padding: 2.5rem;
  position: relative;
  z-index: 1;
}

/* Fullscreen */
.promo-popup--layout-fullscreen .promo-popup {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Image ──────────────────────────────────────────────────────────────── */
.promo-popup__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Content ────────────────────────────────────────────────────────────── */
.promo-popup__content {
  padding: 2rem;
}

.promo-popup__title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

.promo-popup__body {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
}
.promo-popup__body p:last-child {
  margin-bottom: 0;
}

/* ── Coupon box ─────────────────────────────────────────────────────────── */
.promo-popup__coupon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  background: rgba(0, 0, 0, 0.06);
  border: 2px dashed rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s;
}
.promo-popup__coupon:hover {
  background: rgba(0, 0, 0, 0.1);
}
.promo-popup__coupon-code {
  flex: 1;
  user-select: all;
}
.promo-popup__coupon-copy {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  font-family: sans-serif;
  opacity: 0.7;
}
.promo-popup__coupon--copied .promo-popup__coupon-copy {
  opacity: 1;
  color: #4DA803;
}

/* ── Actions ────────────────────────────────────────────────────────────── */
.promo-popup__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.promo-popup__cta {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.promo-popup__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.promo-popup__secondary {
  font-size: 0.85rem;
  text-decoration: underline;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.promo-popup__secondary:hover {
  opacity: 1;
}

/* ── Close button ───────────────────────────────────────────────────────── */
.promo-popup__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, transform 0.15s;
  color: inherit;
  padding: 0;
}
.promo-popup__close:hover {
  background: rgba(0, 0, 0, 0.15);
  transform: scale(1.1);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .promo-popup {
    max-width: 95vw !important;
  }
  .promo-popup--layout-image_left .promo-popup__inner,
  .promo-popup--layout-image_right .promo-popup__inner {
    flex-direction: column !important;
  }
  .promo-popup--layout-image_left .promo-popup__image,
  .promo-popup--layout-image_right .promo-popup__image {
    flex: none;
    max-width: 100%;
    max-height: 200px;
  }
  .promo-popup__content {
    padding: 1.25rem;
  }
  .promo-popup__title {
    font-size: 1.2rem;
  }
}
