/* ── Popup teatised ──────────────────────────────────────────── */

/* Keha scroll lukk */
body.mv-popup-open { overflow: hidden; }

/* Wrapper */
.mv-popup {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

/* Taust-overlay */
.mv-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 33, 62, 0.65);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mv-popup--visible .mv-popup__backdrop {
  opacity: 1;
}

/* Popup kast */
.mv-popup__box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(4, 33, 62, 0.40);

  /* Sissetulev animatsioon */
  transform: scale(0.88) translateY(20px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.3s ease;
}

.mv-popup--visible .mv-popup__box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Taustapilt overlay */
.mv-popup__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(4, 33, 62, 0.62) 0%,
    rgba(4, 33, 62, 0.40) 100%
  );
  pointer-events: none;
}

/* Sisu */
.mv-popup__inner {
  position: relative;
  z-index: 2;
  padding: 44px 40px 36px;
  overflow-y: auto;
  max-height: 90vh;
}

.mv-popup__title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 14px;
}

.mv-popup__content {
  font-size: 15px;
  line-height: 1.65;
  opacity: 0.92;
}

.mv-popup__content p { margin: 0 0 10px; }
.mv-popup__content p:last-child { margin-bottom: 0; }

.mv-popup__content a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.5);
}

.mv-popup__content a:hover {
  text-decoration-color: currentColor;
}

/* Nupp */
.mv-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}

.mv-popup__close:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: scale(1.1);
}

.mv-popup__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Mobiil */
@media (max-width: 480px) {
  .mv-popup { padding: 12px; align-items: flex-end; }
  .mv-popup__box { max-width: 100%; border-radius: 16px 16px 0 0; }
  .mv-popup__inner { padding: 32px 24px 28px; }
  .mv-popup__title { font-size: 20px; }
}
