.container {
  padding: 20px;
}

.form-box {
  background: #fff;
  max-width: 650px;
  margin: 40px auto 10px auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 24px;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
}

.success,
.error {
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 12px;
  text-align: center;
  font-weight: bold;
}

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

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

label {
  display: block;
  margin-top: 14px;
  font-weight: bold;
}

input,
textarea {
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

button[type="submit"] {
  margin-top: 18px;
  background: #0077ff;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px 18px;
  cursor: pointer;
}

button[type="submit"]:hover {
  background: #005bb5;
}

/* Linea telefono */
.phone-line {
  display: flex;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  margin-top: 6px;
}

.phone-prefix {
  min-width: 44px;
  border-right: 1px solid #ccc;
  text-align: center;
  padding: 8px 6px;
  color: #666;
}

.phone-line input {
  border: none;
  flex: 1;
  padding: 8px 10px;
  outline: none;
}

/* === Checkbox Privacy: testo accanto alla spunta === */
.policy-label {
  display: inline-flex;         /* allinea spunta e testo in linea */
  align-items: center;
  gap: 8px;                     /* distanza fra checkbox e testo */
  white-space: nowrap;          /* impedisce l'andata a capo */
  flex-wrap: nowrap;
  color: #333;
  font-size: 0.95em;
  margin-top: 10px;
}

.policy-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}

.policy-label a {
  color: #0077ff;
  text-decoration: underline;
}

.policy-label a:hover {
  color: #005bb5;
}

/* Su schermi molto stretti consenti l'andata a capo */
@media (max-width: 480px) {
  .policy-label {
    white-space: normal;
    flex-wrap: wrap;
  }
}

/* === Checkbox servizi: due colonne ordinate === */
.checkbox-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 20px; /* spazio tra righe e colonne */
  margin-top: 10px;
}

.checkbox-row label {
  display: flex;
  align-items: center;
  gap: 6px; /* spazio tra il quadratino e il testo */
  font-weight: normal;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: #0077ff; /* colore blu coerente con tema */
}

/* su schermi piccoli: torna a una colonna */
@media (max-width: 600px) {
  .checkbox-row {
    grid-template-columns: 1fr;
  }
}
.success {
  transition: opacity 0.6s ease;
}