﻿/* Popup overlay */
.popup-overlay {
  --transition-time: 0.3s;
  --close-button-width: 25px;
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity var(--transition-time) ease-in-out;
  z-index: 100;
}

/* Popup content */
.popup-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  min-width: 280px;
  max-width: 90vw;
  max-height: 80vh;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  position: relative;
  transform: translateY(20px);
  transition: transform var(--transition-time) ease-in-out, opacity var(--transition-time) ease-in-out;
  opacity: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Active state (makes popup visible smoothly) */
.popup-overlay.active {
  opacity: 1;
}

.popup-overlay.active .popup-content {
  transform: translateY(0);
  opacity: 1;
}

/* Close button */
.close-popup {
  position: absolute;
  width: var(--close-button-width);
  height: var(--close-button-width);
  border: 0;
  background: 0;
  cursor: pointer;
  border-radius: 50%;
  right: 10px;
  top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #222222;
}

.close-popup:hover {
  transition: background-color 0.2s ease;
  background-color: rgba(0, 0, 0, 0.15);
}

.close-popup iconify-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Title */
.popup-title {
  font-weight: bold;
  margin-bottom: 10px;
  margin-right: var(--close-button-width);
  overflow-wrap: anywhere;
}

/* Body */
.popup-body {
  margin-bottom: 15px;
}

/* Contact details */
.popup-contact {
  /* color: #555; */
}

/* Shake animation */
@keyframes shake {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-2px);
  }
  40% {
    transform: translateX(2px);
  }
  60% {
    transform: translateX(-2px);
  }
  80% {
    transform: translateX(2px);
  }
  100% {
    transform: translateX(0);
  }
}

.shake-animation {
  animation: shake 0.5s ease-in-out;
}

/* Button container */
.popup-buttons {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

@media (min-width: 576px) {
  .popup-content {
    max-width: 50vw;
  }
}

@media (min-width: 1200px) {
  .popup-content {
    max-width: 30vw;
  }
}
