/* Box sizing – bezpieczne skalowanie */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Cała strona wyśrodkowana */
body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  text-align: center;
  padding: 50px;
}

/* Formularz na środku */
form {
  width: 100%; /* Gwarantuje, że formularz nie wyjdzie poza ekran */
  max-width: 500px; /* Maksymalna szerokość formularza */
  margin: 0 auto; /* Wyśrodkowanie formularza */
  background-color: #fff;
  padding: 10px 30px 30px 30px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Etykiety i pola formularza */
label {
  display: block;
  margin-bottom: 10px;
}

input, select {
  width: 100%;
  padding: 10px;
  margin-top: 4px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  word-wrap: break-word;
  overflow-wrap: break-word; /* Zapewnia łamanie słów */
}

/* Przyciski */
button {
  background-color: #e9bc1a;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

button:hover {
  background-color: #98733a;
}

/* Stylowanie modalu (uniwersalne dla wszystkich) */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none; /* Domyślnie ukryty */
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Kontener modalny */
.modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  max-width: 100%; /* Zapewnia responsywność */
  max-height: 90%;
  overflow-y: auto;
  box-sizing: border-box;
  text-align: left;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Wewnętrzny kontener */
.modal-content .container {
  padding: 10px;
}

/* Nagłówki */
.modal-content header {
  margin-bottom: 20px;
  text-align: left;
}

.modal-content header h1 {
  font-size: 28px;
  color: #e9bc1a;
  margin-bottom: 5px;
}

.modal-content header h2 {
  font-size: 20px;
  color: #777;
}

/* Treść modalna – regulamin / rodo */
.regulamin-content {
  text-align: left;
}

.regulamin-content h3 {
  font-size: 20px;
  margin-top: 20px;
  color: #e9bc1a;
}

.regulamin-content ol,
.regulamin-content ul {
  margin-left: 0px;
  line-height: 1.6;
  padding-left: 0px;
}

.regulamin-content li {
  margin-bottom: 0px;
}

.regulamin-content li ul {
  list-style-type: square;
  margin-left: 0px;
}

.regulamin-content p {
  font-size: 16px;
  color: #555;
  margin-bottom: 10px;
}

.regulamin-content strong {
  color: #333;
}

/* Flex-row do checkboxów i linków */
.flex-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;/* Na wszelki wypadek */
}

/* Styl dla etykiety checkboxa – centralne ustawienie checkboxa nad tekstem */
.checkbox-label {
  display: flex;
  flex-direction: column;  /* Ustawiamy checkbox nad tekstem */
  align-items: center;     /* Wyśrodkowanie w poziomie */
  gap: 5px;                /* Odstęp między checkboxem a tekstem */
  font-size: 16px;
  line-height: 1.4;
  text-align: left;
  max-width: 500px;
  margin: 0 auto; /* Opcjonalnie, jeśli chcesz wyśrodkować całość w kontenerze */
}

/* Styl samego checkboxa */
.checkbox-label input[type="checkbox"] {
  transform: scale(1); /* Możesz dostosować wielkość checkboxa */
  margin: 0;             /* Usuwamy margines wokół checkboxa */
}

/* Linki w tekście zgody */
.checkbox-label a {
  color: #e9bc1a;
  text-decoration: underline;
  word-break: break-word;
}

/* Responsywność: checkbox nad tekstem na małych ekranach */
@media screen and (max-width: 480px) {
  .checkbox-label {
    flex-direction: row; /* Ustawiamy checkbox i tekst obok siebie */
    align-items: center;  /* Wyrównanie w poziomie */
	-webkit-appearance: none;
  }

 .checkbox-label input[type="checkbox"] {
  -webkit-appearance: none; /* WYŁĄCZA styl przeglądarki na iOS */
  appearance: none;         /* Działa też na innych przeglądarkach */
  width: 20px;
  height: 20px;
  border: 2px solid #e9bc1a;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  position: relative;
}
.checkbox-label input[type="checkbox"]:checked::after {
  content: "✔";
  color: #e9bc1a;
  font-size: 16px;
  position: absolute;
  top: 0;
  left: 4px;
}
.checkbox-label {
  cursor: pointer;
  user-select: none;
}

  /* Flex-row w kolumnie na małych ekranach */
  .flex-row {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
	-webkit-appearance: none;
  }

  /* Zmiana szerokości formularza na małych ekranach */
  form {
    width: 90%;
    padding: 20px;
  }

  .modal-content {
    width: 95%;
    padding: 20px;
  }

  .modal-content header h1 {
    font-size: 22px;
  }

  .modal-content header h2 {
    font-size: 16px;
  }

  /* Dostosowanie szerokości logo na małych ekranach */
  .logo-container {
    padding-top: 20px;
  }

  .logo {
    max-width: 80%; /* Możesz dostosować do swoich potrzeb */
    height: auto;
  }
}

/* Responsywność dla większych ekranów */
@media screen and (max-width: 768px) {
  .flex-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-content {
    width: 95%;
    padding: 20px;
  }

  .modal-content header h1 {
    font-size: 22px;
  }

  .modal-content header h2 {
    font-size: 16px;
  }
}

/* Styl wiadomości */
.msg.success {
  background-color: #d4edda;
  color: #155724;
  border: 2px solid #c3e6cb;
  padding: 15px;
  border-radius: 5px;
  margin-top: 20px;
  font-weight: bold;
  text-align: center;
}

.msg.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 2px solid #f5c6cb;
  padding: 15px;
  border-radius: 5px;
  margin-top: 20px;
  font-weight: bold;
  text-align: center;
}

.logo-container {
    text-align: center; /* Wyśrodkowanie elementu wewnątrz kontenera */
    padding-top: 20px;  /* Odstęp od góry strony, możesz dostosować */
}

.logo {
    max-width: 100%;   /* Zapewnia, że logo nie przekroczy szerokości kontenera */
    height: auto;      /* Zachowuje proporcje logo */
}