.cg-popup {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.cg-popup.is-open {
  display: flex;
}

.cg-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  animation: cgFade 160ms ease-out;
}

.cg-popup__modal,
.cg-popup__box {
  position: relative !important;
  width: min(var(--fpc-popup-width), calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
  animation: cgScale 180ms ease-out;
}

.cg-popup__content {
  position: relative;
  padding: 28px 24px 24px;
}

.cg-popup__close {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  bottom: auto !important;
  left: auto !important;
  inset-inline-start: auto !important;
  inset-inline-end: auto !important;
  inset-block-start: auto !important;
  inset-block-end: auto !important;
  transform: none !important;
  float: none !important;
  z-index: 20 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #be185d !important;
  font-size: 20px !important;
  line-height: 1 !important;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(240, 79, 147, 0.16) !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: center !important;
}

.cg-popup .fpc-step-result {
  display: none !important;
}

.cg-popup .cg-step-hidden {
  display: none !important;
}

.cg-popup .cg-step-visible {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.cg-popup .cg-fallback-message {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 6px;
  background: #f8fafc;
}

.cg-popup .is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.cg-popup .is-disabled,
.cg-popup [disabled] {
  opacity: 0.55;
  pointer-events: none;
}

.cg-popup.cg-coupon-is-applied .fpc-apply-coupon,
.cg-popup .fpc-apply-coupon.cg-apply-hidden {
  display: none !important;
}

.cg-popup .fpc-message {
  margin: 10px 0;
}

.cg-popup .fpc-message--success {
  color: #047857;
}

.cg-popup .fpc-message--error {
  color: #b91c1c;
}

.cg-popup-open {
  overflow: hidden;
}

.cg-coupon-chip {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 999998;
  display: block;
  min-height: auto;
  box-sizing: border-box;
  max-width: min(240px, calc(100vw - 32px));
  padding: 8px 28px 8px 12px;
  border: 1px dashed #f04f93;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: #831843;
  box-shadow: 0 10px 30px rgba(240, 79, 147, 0.12);
  font-size: 12px;
  line-height: 1.2;
  backdrop-filter: blur(10px);
}

.cg-coupon-chip__label {
  display: block;
  margin-bottom: 3px;
  color: #be185d;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.1;
}

.cg-coupon-chip__body {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cg-coupon-chip__code {
  color: #9d174d;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.cg-coupon-chip__timer {
  font-weight: 700;
  color: #db2777;
  white-space: nowrap;
}

.cg-coupon-chip__close {
  position: absolute;
  top: 4px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 0 !important;
  border-radius: 50%;
  background: transparent !important;
  color: #831843;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.cg-inline-coupon-timer {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 7px;
  border: 1px dashed #f04f93;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #db2777;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  vertical-align: middle;
}

.cg-inline-coupon-timer__time {
  color: inherit;
}

.cg-inline-coupon-timer__dot {
  margin-right: 4px;
  color: #f04f93;
}

@keyframes cgFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cgScale {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 600px) {
  .cg-popup__content {
    padding: 30px 16px 20px;
  }

  .cg-coupon-chip {
    left: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    max-width: min(220px, calc(100vw - 16px));
    padding: 7px 26px 7px 10px;
    font-size: 11px;
  }

  .cg-coupon-chip__code {
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
