/* ===== Уникальные CSS-переменные для кастомизации ===== */
:root {
  --popup-primary-color: #388da8;
  --popup-secondary-color: #fff;
  --popup-overlay-color: #000;
  --popup-overlay-opacity: 0.7;
  --popup-border-radius: 12px;
  --popup-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  --popup-close-btn-size: 36px;
  --popup-transition: 0.3s ease;
}

/* ===== Основной оверлей (фон) ===== */
.unique-popup-overlay {
  display: none;
}
.unique-popup-overlay::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--popup-overlay-color);
  opacity: 0.7;
  z-index: 9999;
 /* transition: opacity var(--popup-transition);*/
}

.unique-popup-overlay.active {
  display: block;
 /* opacity: var(--popup-overlay-opacity);*/
}

/* ===== Контейнер попапа ===== */
.unique-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 80%;
  max-width: 600px;
  background: var(--popup-secondary-color);
  border-radius: var(--popup-border-radius);
  box-shadow: var(--popup-shadow);
  z-index: 10000;
  opacity: 0;
  transition: all var(--popup-transition);
  overflow: hidden;
}

.unique-popup.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ===== Кнопка закрытия ===== */
.unique-popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: var(--popup-close-btn-size);
  height: var(--popup-close-btn-size);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  border-radius: 50%;
  background: var(--popup-primary-color);
  color: var(--popup-secondary-color);
  border: 2px solid var(--popup-secondary-color);
  cursor: pointer;
  transition: all 0.2s;
}

.unique-popup-close:hover {
  background: var(--popup-secondary-color);
  color: var(--popup-primary-color);
  border-color: var(--popup-primary-color);
  transform: rotate(90deg);
}

/* ===== Заголовок попапа ===== */
.unique-popup-header {
  padding: 20px;
  background: var(--popup-primary-color);
  color: var(--popup-secondary-color);
  font-size: 1.5rem;
  font-weight: bold;
}

/* ===== Тело попапа ===== */
.unique-popup-body {
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
}

/* ===== Футер попапа (кнопки действий) ===== */
.unique-popup-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 20px;
  border-top: 1px solid #eee;
}

/* ===== Размерные модификаторы ===== */
.unique-popup.small {
  max-width: 400px;
}

.unique-popup.large {
  max-width: 800px;
}

.unique-popup.fullscreen {
  width: 95%;
  height: 95vh;
  max-width: none;
}

/* ===== Анимация при открытии/закрытии ===== */
@keyframes uniquePopupFadeIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes uniqueOverlayFadeIn {
  from { opacity: 0; }
  to { opacity: var(--popup-overlay-opacity); }
}

.unique-popup.active {
  animation: uniquePopupFadeIn 0.3s ease-out;
}

.popup-content {
    padding: 10px;
}

/*.unique-popup-overlay.active {
  animation: uniqueOverlayFadeIn 0.3s ease-out;
}*/