/* Modal zawsze wyśrodkowany, z opcją przewijania */
.modal {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  z-index: 9999;
  padding: 20px;
}

/* Opisy do lewej

/* Ulepszone okno modala */
.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: fadeIn 0.3s ease;
}

/* Zamknięcie modala – X */
.close-contact {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  color: #333;
  cursor: pointer;
}

/* Formularz lepiej dopasowany */
.form-container {
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* Inputy i textarea spójne i pełna szerokość */
input, textarea, select {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
}

/* Checkbox styl + dostępność */
.rodo-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95em;
  margin-bottom: 20px;
  line-height: 1.5;
}

.rodo-checkbox input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 3px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.rodo-checkbox label {
  flex-grow: 1;
  cursor: pointer;
}

.rodo-checkbox a {
  color: #007BFF;
  text-decoration: underline;
}

.rodo-checkbox a:hover {
  text-decoration: none;
}

/* wymuszamy wyrównanie tekstu wewnątrz formularza do lewej */
.form-container {
  text-align: left;
}

/* dodatkowo upewniamy się, że labelki są blokami i mają odstęp od pola */
.form-container label {
  display: block;
  margin-bottom: 0.3em;
  font-weight: 500; /* lub inna wartość wg uznania */
}

/* tylko H1 ma być wyśrodkowany */
.form-container h1 {
  text-align: center;
  margin-bottom: 0.8em; /* opcjonalnie, dla odstępu od reszty */
}

.form-container h3 {
  text-align: center;
  margin-bottom: 1.2em;
}

/* Przycisk z ładnym stylem */
button {
  width: 100%;
  padding: 12px;
  background-color: #007bff;
  color: white;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #0056b3;
}

/* Animacja wjazdu modala */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .modal-content {
    width: 94%; /* jeszcze ciut węższe */
    max-width: 94%;
    margin: 10px auto;
    padding: 12px;
    border-radius: 10px;
    box-sizing: border-box;
  }

  input, textarea, select {
    font-size: 14px; /* delikatnie mniejsza czcionka */
    padding: 10px 6px; /* jeszcze trochę mniej paddingu w poziomie */
  }

  .form-container {
    width: 100%;
  }

  .form-container h1 {
    font-size: 1.2rem; /* minimalne zmniejszenie tytułu */
    margin-bottom: 6px;
    text-align: center;
  }

  .form-container h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    text-align: center;
  }

  button {
    padding: 10px;
    font-size: 15px;
  }
}