/* CM Pop-Up Banners Responsive Frontend CSS */

.cmpopfly-wrapper {
  position: fixed;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  box-sizing: border-box;
}

.cmpopfly-wrapper * {
  box-sizing: border-box;
}

/* Modal Popup (Tengah) */
.cmpopfly-type-popup {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cmpopfly-type-popup .cmpopfly-overlay,
.cmpopfly-type-fullscreen .cmpopfly-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.cmpopfly-type-popup .cmpopfly-container {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  animation: cmpopfly-zoomIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Fly-in Bawah Kanan */
.cmpopfly-type-flyin_bottom_right {
  bottom: 24px;
  right: 24px;
}
.cmpopfly-type-flyin_bottom_right .cmpopfly-container {
  width: 360px;
  max-width: calc(100vw - 48px);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.25);
  animation: cmpopfly-slideUp 0.4s ease;
}

/* Fly-in Bawah Kiri */
.cmpopfly-type-flyin_bottom_left {
  bottom: 24px;
  left: 24px;
}
.cmpopfly-type-flyin_bottom_left .cmpopfly-container {
  width: 360px;
  max-width: calc(100vw - 48px);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.25);
  animation: cmpopfly-slideUp 0.4s ease;
}

/* Top Notification Bar */
.cmpopfly-type-top_bar {
  top: 0;
  left: 0;
  width: 100%;
}
.cmpopfly-type-top_bar .cmpopfly-container {
  width: 100%;
  padding: 14px 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  animation: cmpopfly-slideDown 0.35s ease;
}

/* Tombol Tutup */
.cmpopfly-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.08);
  border: none;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.cmpopfly-close-btn:hover {
  background: rgba(0, 0, 0, 0.15);
  transform: scale(1.08);
}

/* Elemen Konten */
.cmpopfly-image-wrap {
  margin: -30px -30px 20px -30px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}
.cmpopfly-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.cmpopfly-headline {
  margin: 0 0 10px 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.cmpopfly-body {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 20px;
}

/* Kupon */
.cmpopfly-coupon-box {
  background: rgba(0, 0, 0, 0.04);
  border: 2px dashed rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.cmpopfly-coupon-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  opacity: 0.7;
}
.cmpopfly-coupon-code {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #4f46e5;
}

/* CTA */
.cmpopfly-action-wrap {
  margin-top: 10px;
}
.cmpopfly-cta-btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 14px 24px;
  border-radius: 12px;
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none !important;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.cmpopfly-cta-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* Animasi */
@keyframes cmpopfly-zoomIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes cmpopfly-slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cmpopfly-slideDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}
