/**
 * Swarm Modal — styles for pricing page popups.
 * Replaces Popups for Divi plugin CSS (~15KB) with this (~0.8KB).
 */

/* Hide modal sections by default */
.swarm-modal {
  display: none !important;
}

/* Visible state — centered fixed modal */
.swarm-modal.swarm-modal--active {
  display: block !important;
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 100001 !important;
  overflow-y: auto !important;
  /* Divi shortcode already sets width/max-width/max-height/border-radius/background */
}

/* Overlay backdrop */
.swarm-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100000;
}

.swarm-modal-overlay--visible {
  display: block;
}

/* Close button */
.swarm-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 100002;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #333;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.swarm-modal-close:hover {
  opacity: 1;
}

/* Mobile: full-screen modal with vertically centered content */
@media (max-width: 767px) {
  .swarm-modal.swarm-modal--active {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    overflow-y: auto !important;
  }
}
