/* DevLux Popup Pro — Frontend Popup Styles */

:root {
  --dlpp-accent: #6366f1;
  --dlpp-btn-bg: #6366f1;
  --dlpp-btn-text: #ffffff;
}

/* ---- Overlay ---- */
.dlpp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 999999;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.dlpp-overlay.dlpp-visible {
  opacity: 1;
  visibility: visible;
}

/* ---- Popup box ---- */
.dlpp-popup {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1);
  text-align: center;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
}
.dlpp-overlay.dlpp-visible .dlpp-popup {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Slide animation override */
.dlpp-anim--slide {
  transform: translateY(60px);
}
.dlpp-overlay.dlpp-visible .dlpp-anim--slide {
  transform: translateY(0);
}

/* Zoom animation override */
.dlpp-anim--zoom {
  transform: scale(0.8);
}
.dlpp-overlay.dlpp-visible .dlpp-anim--zoom {
  transform: scale(1);
}

/* ---- Close button ---- */
.dlpp-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  background: #f3f4f6;
  color: #9ca3af;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  padding: 0;
  line-height: 1;
}
.dlpp-popup__close:hover {
  background: #e5e7eb;
  color: #374151;
}

/* ---- Badge (Sale type) ---- */
.dlpp-popup__badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---- Icon ---- */
.dlpp-popup__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

/* ---- Headline / Sub ---- */
.dlpp-popup__headline {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 10px;
  line-height: 1.3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.dlpp-popup__sub {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 24px;
}

/* ---- Form ---- */
.dlpp-popup__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dlpp-popup__input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  outline: none;
}
.dlpp-popup__input:focus {
  border-color: var(--dlpp-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: #fff;
}
.dlpp-popup__input::placeholder { color: #9ca3af; }

/* ---- Button ---- */
.dlpp-popup__btn {
  width: 100%;
  padding: 13px 24px;
  background: var(--dlpp-btn-bg);
  color: var(--dlpp-btn-text);
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s, transform 0.1s;
  margin-top: 4px;
}
.dlpp-popup__btn:hover { opacity: 0.9; }
.dlpp-popup__btn:active { transform: scale(0.99); }
.dlpp-popup__btn:disabled { opacity: 0.65; cursor: not-allowed; }

/* Spinner */
.dlpp-spin {
  animation: dlpp-spin 0.8s linear infinite;
}
@keyframes dlpp-spin {
  to { transform: rotate(360deg); }
}

/* ---- Error ---- */
.dlpp-popup__error {
  font-size: 13px;
  color: #ef4444;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  text-align: left;
}

/* ---- Success state ---- */
.dlpp-popup__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}
.dlpp-popup__success-msg {
  font-size: 15px;
  color: #374151;
  margin: 0;
  line-height: 1.5;
}

/* ---- Coupon ---- */
.dlpp-popup__coupon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 16px;
  background: #fffbeb;
  border: 1.5px dashed #f59e0b;
  border-radius: 8px;
}
.dlpp-popup__coupon-label {
  font-size: 12px;
  color: #92400e;
}
.dlpp-popup__coupon-code {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #92400e;
  font-family: monospace;
}
.dlpp-popup__coupon-copy {
  padding: 4px 10px;
  background: #f59e0b;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.dlpp-popup__coupon-copy:hover { opacity: 0.85; }

/* ---- GDPR ---- */
.dlpp-popup__gdpr {
  font-size: 11px;
  color: #9ca3af;
  margin: 16px 0 0;
  line-height: 1.5;
}

/* ---- Sale type accent bar ---- */
.dlpp-popup--sale::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  border-radius: 16px 16px 0 0;
}

/* ---- Newsletter type accent bar ---- */
.dlpp-popup--newsletter::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--dlpp-accent);
  border-radius: 16px 16px 0 0;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .dlpp-popup {
    padding: 32px 22px;
    border-radius: 14px;
  }
  .dlpp-popup__headline { font-size: 18px; }
}
