/* Фон модалки */
.modal {
  display: none; /* прихована за замовчуванням */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6); /* напівпрозорий фон */
}

/* Вміст модалки */
.modal-content {
  background-color: #fff;
  margin: 5% auto; /* центрування по вертикалі з верхньою відступом */
  padding: 30px 20px;
  border-radius: 10px;
  width: 400px;
  max-width: 90%; /* адаптивність для мобільних */
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  position: relative;
  animation: fadeIn 0.3s ease-in-out;
}

/* Анімація появи */
@keyframes fadeIn {
  from {opacity: 0; transform: translateY(-20px);}
  to {opacity: 1; transform: translateY(0);}
}

/* Кнопка закриття */
.modal-content .close {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #333;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-content .close:hover {
  color: #e74c3c;
}

/* Заголовок */
.modal-content h2 {
  margin-top: 0;
  font-size: 24px;
  text-align: center;
  color: #333;
}

/* Форма */
.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 15px; /* відстань між елементами */
}

/* Поля вводу */
.modal-content input {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
  transition: border 0.2s;
}

.modal-content input:focus {
  border-color: #3498db;
  outline: none;
}

/* Кнопка відправки */
.modal-content button {
  padding: 12px;
  font-size: 16px;
  background-color: #3498db;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.modal-content button:hover {
  background-color: #2980b9;
}

/* Адаптивність на дуже маленьких екранах */
@media (max-width: 480px) {
  .modal-content {
    padding: 20px 15px;
    width: 95%;
  }
}
