/* ============================================================
   Overlay
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(40, 55, 65, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 999999;
}

.overlay--visible {
  opacity: 1;
  visibility: visible;
  z-index: 999999;

}

/* ============================================================
   Popup
   ============================================================ */
.popup {
  width: 100%;
  max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  transform: translateY(18px) scale(0.97);
  transition: transform 0.28s cubic-bezier(.34,1.4,.64,1), opacity 0.25s ease;
  opacity: 0;
  overflow: hidden;
  z-index: 999999;

}

.overlay--visible .popup {
  width: 100%;
  background: #f4f6f8;
  transform: translateY(0) scale(1);
  opacity: 1;
  z-index: 999999;
  max-width: 360px;

}

/* -- Header -- */
.popup__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 10px 20px;

}

.popup__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-label-text);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.popup__close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.popup__close:hover { color: var(--color-text); background: var(--color-border); }

/* -- Body -- */
.popup__body {
  padding: 22px 24px 24px;
}

.popup__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

@media (max-width: 420px) {
  .popup__body { padding: 18px 16px 20px; }
  .popup__title { font-size: 16px; }
}