/* ===== Kontener formularza ===== */
.form-box {
  max-width: 650px;
  margin: 40px auto;
  background-color: #fff;
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

/* Nagłówki */
.form-box h1 {
  font-size: 28px;
  text-align: center;
  margin-bottom: 20px;
  color: #00508c;
}

.form-box h2 {
  font-size: 22px;
  text-align: center;
  margin-top: 30px;
  margin-bottom: 15px;
  padding-bottom: 5px;
  color: #00508c;
}

/* Komunikaty sukcesu / błędu - STARE (można usunąć, bo są zastąpione modalem) */
.success, .error {
  padding: 12px 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-weight: 500;
  display: none;
}

.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Etykiety i pola formularza */
label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #000;
}

.req {
  color: red;
}

input[type="text"], 
input[type="email"], 
input[type="tel"], 
input[type="file"] {
  width: 100%;
  padding: 12px 12px;
  margin-bottom: 18px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}

input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="tel"]:focus, 
input[type="file"]:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 6px rgba(0, 123, 255, 0.3);
}

/* Checkbox RODO */
.rodo-label {
  display: flex;
  align-items: center;
  font-size: 14px;
  margin-bottom: 15px;
  gap: 8px;
}

.rodo-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.rodo-link {
  color: #00508c;
  text-decoration: none;
}

.rodo-link:hover {
  color: #e30513;
}

/* Informacja o polach wymaganych */
.akcept {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
}

.info {
  font-size: 13px;
  color: #666;
  margin-top: -10px;
  margin-bottom: 15px;
}

/* Informacja o reCAPTCHA */
.recaptcha-info {
  font-size: 12px;
  color: #999;
  text-align: center;
  margin-top: 15px;
  line-height: 1.5;
}

.recaptcha-info a {
  color: #00508c;
  text-decoration: none;
}

.recaptcha-info a:hover {
  text-decoration: underline;
}

/* Przycisk wysyłania */
button[type="submit"] {
  display: block;
  width: 100%;
  background-color: #00508c;
  color: #fff;
  padding: 14px;
  border: none;
  border-radius: 7px;
  font-family: Play, sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

button[type="submit"]:hover {
  background-color: #003a66;
  transform: translateY(-1px);
}

button[type="submit"]:active {
  transform: translateY(0);
}

button[type="submit"]:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
  transform: none;
}

/* ==================== MODAL ==================== */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 0;
  border: none;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.4s ease;
  position: relative;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close-btn {
  position: absolute;
  right: 15px;
  top: 15px;
  color: #aaa;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1;
  z-index: 10;
  background: none;
  border: none;
  padding: 0;
  width: auto;
}

.close-btn:hover,
.close-btn:focus {
  color: #000;
  transform: scale(1.1);
}

#modal-message {
  padding: 40px 30px 30px 30px;
}

/* ==================== KOMUNIKATY SUKCESU ==================== */
.success-message {
  text-align: center;
}

.success-message h3 {
  color: #28a745;
  font-size: 28px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.success-message p {
  color: #333;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

/* ==================== KOMUNIKATY BŁĘDÓW ==================== */
.error-message {
  text-align: left;
}

.error-message h3 {
  color: #dc3545;
  font-size: 24px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.error-message p {
  color: #333;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.error-details {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 15px;
  margin: 15px 0;
  border-radius: 4px;
  font-size: 14px;
  color: #856404;
}

.error-details strong {
  display: block;
  margin-bottom: 8px;
  color: #856404;
}

.error-solution {
  background-color: #d1ecf1;
  border-left: 4px solid #17a2b8;
  padding: 15px;
  margin: 15px 0;
  border-radius: 4px;
  font-size: 14px;
  color: #0c5460;
}

.error-solution strong {
  display: block;
  margin-bottom: 8px;
  color: #0c5460;
}

/* ==================== KOMUNIKAT ŁADOWANIA ==================== */
.loading-message {
  text-align: center;
}

.loading-message h3 {
  color: #00508c;
  font-size: 24px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.loading-message p {
  color: #666;
  font-size: 16px;
  margin: 0;
}

/* Animacja ładowania - spinner */
.loading-message h3::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 3px solid #00508c;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Responsywność - ogólna ===== */
@media (max-width: 640px) {
  .form-box {
    padding: 20px;
  }
  
  input[type="text"], 
  input[type="email"], 
  input[type="tel"], 
  input[type="file"], 
  button[type="submit"] {
    font-size: 14px;
    padding: 12px 12px;
  }
}

/* ===== Responsywność - modal ===== */
@media (max-width: 768px) {
  .modal-content {
    margin: 20% auto;
    width: 95%;
    max-width: none;
  }

  #modal-message {
    padding: 35px 20px 20px 20px;
  }

  .success-message h3,
  .error-message h3,
  .loading-message h3 {
    font-size: 20px;
  }

  .success-message p,
  .error-message p,
  .loading-message p {
    font-size: 14px;
  }

  .error-details,
  .error-solution {
    font-size: 13px;
    padding: 12px;
  }

  .close-btn {
    font-size: 28px;
    right: 10px;
    top: 10px;
  }
}

/* ===== Efekt fade in left ===== */
.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  animation: fadeInLeft 0.6s ease-out 0.4s forwards;
}

@keyframes fadeInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== Blokowanie scroll-top ===== */
.page-form .scroll-top {
  display: none !important;
}