/* ================= RESET ================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111;
  background: #e9e9e9;
  padding-bottom: var(--bottom-bar-offset, 88px);
}
/* Overlay */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 9998;
}

/* Modal */
.popup-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 0px;
  width: 100%;
  max-width: 440px;
  box-shadow: 
    0 40px 80px rgba(0,0,0,0.25),
    inset 0 0 0 1px rgba(255,255,255,0.4);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  z-index: 9999;
}

/* Active state */
.popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.popup-modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* Close button */
.popup-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(15,23,42,0.08);
  color: #0f172a;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.popup-close:hover {
  background: rgba(239,68,68,0.15);
  color: #dc2626;
  transform: rotate(90deg);
}

/* Mobile */
@media (max-width: 480px) {
  .popup-modal {
    border-radius: 18px;
  }
  
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
