/* Базовые стили модального окна */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  animation: modalFadeIn 0.3s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal-container {
  background: #ffffff;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
  overflow: hidden;
}

/* Заголовок модального окна */
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #cdcdcd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9fafb;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  font-family: cursive;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  line-height: 1;
}

.modal-close-btn:hover {
  background: #e5e7eb;
  color: #111827;
}

/* Тело модального окна (содержимое) */
.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  background: #ffffff;
}
.modal-body p {
  margin-bottom:9px;
  font-size: 18px;

}
/* Стили для содержимого внутри modal-body */
.modal-body > *:first-child {
  margin-top: 0;
}

.modal-body > *:last-child {
  margin-bottom: 0;
}

/* Футер модального окна */
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f9fafb;
}

.modal-action-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.modal-action-btn.modal-close-action {
  background: #e5e7eb;
  color: #374151;
}

.modal-action-btn.modal-close-action:hover {
  background: #d1d5db;
}

/* Дополнительные кнопки действия (пример) */
.modal-action-btn.modal-confirm-action {
  background: #3b82f6;
  color: white;
}

.modal-action-btn.modal-confirm-action:hover {
  background: #2563eb;
}

/* Анимации */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-30px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 640px) {
  .modal-container {
    width: 95%;
    max-height: 95vh;
    border-radius: 12px;
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-body {
    padding: 16px 20px;
  }

  .modal-footer {
    padding: 12px 20px;
    flex-direction: column;
  }

  .modal-action-btn {
    width: 100%;
    text-align: center;
    padding: 10px;
  }
}

/* Стили для кнопки вызова (пример) */
.modal-trigger-btn {
  padding: 12px 24px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-trigger-btn:hover {
  background: #2563eb;
}