/* static/css/modal.css */
/* Стили для универсальных модальных окон */

#modal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  pointer-events: none;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: all;
}

.modal-overlay.show {
  opacity: 1;
}

.modal-dialog {
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  max-height: 90vh;
  overflow: auto;
  transform: translateY(-50px);
  transition: transform 0.3s ease;
}

.modal-overlay.show .modal-dialog {
  transform: translateY(0);
}

/* Размеры модальных окон */
.modal-sm {
  width: 400px;
}

.modal-md {
  width: 600px;
}

.modal-lg {
  width: 800px;
}

.modal-xl {
  width: 1200px;
}

.modal-content {
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
}

.modal-body p {
  margin: 0 0 1rem 0;
  line-height: 1.6;
  color: #555;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-body input.form-control,
.modal-body textarea.form-control {
  margin-top: 0.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.modal-footer .btn {
  min-width: 80px;
}

/* Адаптивность */
@media (max-width: 768px) {
  .modal-dialog {
    max-width: 95%;
    margin: 1rem;
  }

  .modal-sm,
  .modal-md,
  .modal-lg,
  .modal-xl {
    width: 100%;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }

  .modal-title {
    font-size: 1.25rem;
  }
}
