.modal {
  display: block; /* обов'язково block! */
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.7);
}

.modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  width: 300px;
  text-align: center;
  border-radius: 8px;
}

.flags img {
  width: 50px;
  margin: 10px;
  cursor: pointer;
}

/* Фон модалки */
.custom-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

/* Контейнер контенту */
.custom-modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.close-btn {
  float: right;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  color: red;
}

.custom-modal-content h5 {
  margin: 0 0 10px 0;
  font-size: 18px;
}

.custom-modal-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.custom-modal-content li {
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

.custom-modal-content a {
  color: #007bff;
  text-decoration: none;
  display: block; /* блочний, але не розтягує висоту */
  padding: 2px 0; /* легенький відступ, щоб не прилипали */
  font-size: 16px;
}

.custom-modal-content a:hover {
  text-decoration: underline;
}
