/* ==========================================================================
   VivaMama — Homepage Welcome Popup
   Semi-fullscreen modal (5-10px gap from viewport edges) that shows the
   VivaMama landing page inside an iframe, with a close button.
   ========================================================================== */

.vm-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36, 16, 64, 0.55); /* uses --vm-ink tone */
  backdrop-filter: blur(3px);
  z-index: 99998;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.vm-popup-overlay.is-active {
  display: flex;
  opacity: 1;
}

.vm-popup-modal {
  position: fixed;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(53, 11, 109, 0.25);
  overflow: hidden;
  transform: scale(0.97);
  transition: transform 0.25s ease;
}

.vm-popup-overlay.is-active .vm-popup-modal {
  transform: scale(1);
}

.vm-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #ffffff;
  color: #241040;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 4px 14px rgba(53, 11, 109, 0.25);
  transition: background 0.2s ease, transform 0.2s ease;
}

.vm-popup-close:hover {
  background: #eee2ff;
  transform: scale(1.06);
}

.vm-popup-iframe-wrap {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.vm-popup-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Prevent background scroll while popup is open */
body.vm-popup-open {
  overflow: hidden;
}

@media (max-width: 576px) {
  .vm-popup-modal {
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border-radius: 12px;
  }

  .vm-popup-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}
