/* Kontener ogólny dla stron z formularzem */
.container {
  max-width: 600px;  /* maksymalna szerokość formularza na PC */
  margin: 10px auto; /* wyśrodkowanie + lekki odstęp od góry/dół */
  padding: 0 16px;   /* odstęp boczny na mobile */
  box-sizing: border-box;
}

/* Wrapper formularza */
.form-wrapper {
  margin: 0 auto;
}

/* Sam formularz */
.form {
  background: #031e3f;      /* lekko jaśniejsze niż tło strony */
  padding: 20px;
  border-radius: 14px;
  color: #cfd7e3;
}

/* Pojedyncze pole formularza */
.form-group {
  margin-bottom: 16px;
}
.form-group:last-child {
  margin-bottom: 0;
}

/* Etykiety */
.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
}

/* Pola do wpisywania */
.form-input,
.form-textarea,
.form-select {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #cfd7e3;
  font-size: 16px;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

/* Placeholder */
.form-input::placeholder,
.form-textarea::placeholder {
  color: #99a7b7;
}

/* Opisy pod polami */
.form-hint {
  margin-top: 4px;
  font-size: 12px;
  color: #99a7b7;
}

/* Komunikaty */
.form-error {
  margin-top: 4px;
}

.form-success {
  margin-bottom: 12px;
  padding: 10px 12px;
  /*background: #163a2d;
  border-radius: 10px;*/
  color: #b9ffe3;
}

/* Przyciski */
.btn,
a.btn {
  font-family: "Poppins", "Open Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  display: inline-block;
  padding: 8px 16px;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: filter 0.2s ease;
}

.btn {
  background: #00bfff;
  color: #001935;
}

.btn:hover { filter: brightness(1.05); }
.btn:active { transform: none !important; }

.btn-secondary {
  background: #2f3b51;
  color: #cfd7e3;
}

.btn-danger {
  background: #b33535;
  color: #fff;
}

/* Stały wygląd linków .btn */
a.btn,
a.btn:hover,
a.btn:focus,
a.btn:active {
  font-family: "Poppins", "Open Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  padding: 10px 16px !important;
  height: auto !important;
  background-color: #2f3b51 !important;
  color: #cfd7e3 !important;
  border: none;
  transform: none !important;
  text-decoration: none;
  box-shadow: none !important;
}

/* Globalny kill focusa */
*:focus,
*:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Inputy i textarea spójne */
.form input[type=text],
.form input[type=email],
.form input[type=number],
.form textarea,
.form-select {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #cfd7e3 !important;
  border: none !important;
}

/* Placeholder spójny */
.form input::placeholder,
.form textarea::placeholder {
  color: #99a7b7 !important;
  font-family: "Poppins", "Open Sans", sans-serif;
  font-size: 1rem;
}

/* Naprawa koloru przy autofill */
.form input:-webkit-autofill,
.form textarea:-webkit-autofill {
  -webkit-text-fill-color: #cfd7e3 !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Usunięcie strzałek z number */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] { -moz-appearance: textfield; }
#captcha { max-width:35px; max-height: 35px text-align:center; }

/* Terms */
.terms-row { margin: 12px 0; }
.terms-label { display: flex; gap: 8px; align-items: center; font-size: 0.95rem; }
.terms-label a { text-decoration: underline; cursor: pointer; }
.terms-error { color: #e00050; font-size: 0.9rem; margin-top: 6px; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 9999; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-card {
  position: relative; z-index: 1; max-width: 800px; width: 92%;
  margin: 6vh auto; background: #fff; border-radius: 12px; padding: 20px; max-height: 88vh; overflow: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.modal-close {
  position: absolute; top: 8px; right: 12px; border: 0; background: transparent;
  font-size: 28px; line-height: 1; cursor: pointer;
}
.modal-content p { margin: 0; line-height: 1.2em; }

/* Wspólny wygląd błędów */
.error-text {
  color: #e00050;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  font-family: "Poppins","Open Sans",sans-serif;
}

.error-block {
  background: #ffe9e9;
  border: 1px solid #ffc6c6;
  border-radius: 10px;
  padding: 10px 12px;
}

.error-inline {
  margin-top: 6px;
}

.regulam { float: right; margin-right: 10px; margin-top: 5px; }

/* Ukrycie początkowe błędów klienta */
#clientErrors { display:none; }
/* ===== Ujednolicenie błędów na login.php i register.php ===== */

/* Kolor/czcionka dla wszystkich kontenerów błędów w formularzach */
.form .form-error,
.form .error-text,
.form #clientErrors,
.form .login-error {
  color: #e00050 !important;         /* czerwony tekst */
  font-size: 14px !important;
  line-height: 1.4 !important;
  font-weight: 500 !important;
  font-family: "Poppins","Open Sans",sans-serif !important;
  margin-top: 6px;                   /* jak error-inline */
}

/* Jeśli gdzieś zostało .error-block – neutralizujemy tło/ramkę,
   żeby wyglądało jak pozostałe komunikaty */
.form .error-block {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}
/* Ujednolicenie wyglądu pola "Wybierz plik" */
.form-input[type=file] {
    background-color: #031e3f; /* kolor taki jak w add_gallery.php */
    color: #fff;
    padding: 6px;
    cursor: pointer;
}

.form-input[type=file]::file-selector-button {
    background-color: #0056b3; /* kolor przycisku */
    color: #fff;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
	border-radius: 10px;
}

.form-input[type=file]::file-selector-button:hover {
    background-color: #004494;
}
