@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&display=swap');

/* ============================================================
   Octaboo Timed Pop-up Style - Masterpiece Version
   Supports Light and Dark Mode transitions smoothly.
   ============================================================ */

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--popup-overlay);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
  padding: 1.5rem;
}

.popup-overlay.is-active {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
}

.popup-container {
  background: var(--popup-mesh-bg);
  background-color: var(--popup-bg);
  color: var(--popup-text);
  border: 1px solid var(--popup-border);
  border-radius: 1.5rem;
  width: 100%;
  max-width: 950px;
  position: relative;
  box-shadow: var(--popup-shadow);
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.popup-overlay.is-active .popup-container {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Background decorations & animations */
.popup-bg-decorations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.floating-element {
  filter: drop-shadow(0 0 8px var(--popup-floating-shadow));
  opacity: 0.4;
  color: var(--brand-purple);
  transition: color 0.3s ease;
}

.popup-content {
  padding: 3rem 2.5rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.popup-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--popup-close-color);
  cursor: pointer;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.popup-close-btn:hover {
  background-color: var(--popup-close-hover-bg);
  color: var(--popup-text);
}

.popup-close-btn .material-symbols-outlined {
  font-size: 1.25rem;
}

.popup-badge-wrapper {
  margin-bottom: 1.5rem;
}

.hand-drawn-badge {
  font-family: 'Dancing Script', 'Brush Script MT', cursive;
  font-size: 1.15rem;
  font-weight: 700;
  border: 1px solid var(--popup-badge-border);
  box-shadow: 0 0 10px var(--popup-badge-shadow);
  color: var(--brand-purple);
  background: var(--popup-badge-bg);
  padding: 0.25rem 1.25rem;
  border-radius: 9999px;
  display: inline-block;
  letter-spacing: 0.02em;
}

.popup-title {
  font-family: 'Inter', 'Public Sans', sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  color: var(--popup-text);
}

.popup-title .text-brand-purple {
  color: var(--brand-purple);
}

.popup-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--popup-text-muted);
  margin-bottom: 2rem;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.popup-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 2rem 0;
}

@media (min-width: 640px) {
  .popup-form {
    flex-direction: row;
  }
}

.popup-input-wrapper {
  flex-grow: 1;
  position: relative;
}

.glass-input {
  width: 100%;
  padding: 1rem 1.5rem !important;

  background: var(--popup-input-bg) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--popup-input-border) !important;
  color: var(--popup-input-text) !important;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.glass-input::placeholder {
  color: var(--popup-input-placeholder) !important;
}

.popup-input{
  border-radius: 999px !important;
  height: 100%;
}

.glass-input:focus {
  outline: none;
  border-color: var(--popup-border-focus) !important;
  box-shadow: 0 0 15px var(--popup-border-focus-glow) !important;
  background: var(--popup-input-bg-focus) !important;
}

.popup-submit-btn {
  padding: 1rem 2rem;
  border-radius: 999px;
  border: none;
  background: var(--popup-btn-bg);
  color: var(--popup-btn-text);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--popup-glow);
  white-space: nowrap;
}

.popup-submit-btn:hover {
  background: var(--popup-btn-bg-hover);
  box-shadow: var(--popup-glow);
}

.popup-submit-btn:active {
  transform: scale(0.95);
}

.popup-disclaimer {
  font-size: 0.7rem;
  color: var(--popup-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 1rem;
}

/* Custom Animations */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 15px 2px var(--brand-purple-transparent);
  }
  50% {
    box-shadow: 0 0 25px 6px var(--popup-glow-mid);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-15px) translateX(8px);
  }
}

.animate-pulse-glow {
  animation: pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 8s ease-in-out infinite 1s;
}

.animate-spin-slow {
  animation: spin 12s linear infinite;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Animations & Responsive Support */
@media (max-width: 480px) {
  .popup-overlay {
    padding: 1rem;
  }
  .popup-content {
    padding: 2.25rem 1.25rem;
  }
  .popup-title {
    font-size: 1.75rem;
  }
  .hand-drawn-badge {
    font-size: 1rem;
  }
}
