/* Stili per la landing page dati paziente ambulanza FCTSA
 * Palette ispirata al sito FCTSA: blu istituzionale, bianco, grigi chiari.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  color: #222222;
  background-color: #f5f7fa;
}

a {
  color: #004f9f;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.logo-area img {
  max-height: 50px;
  width: auto;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #dde4ee;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.logo-link {
  font-weight: 700;
  font-size: 1.25rem;
  color: #004f9f;
}

.site-nav ol {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.site-nav li::after {
  content: "/";
  margin-left: 0.5rem;
  color: #999;
}

.site-nav li:last-child::after {
  content: "";
}

.site-main {
  padding-bottom: 3rem;
}

.hero {
  background: linear-gradient(135deg, #002040 0%, #00152a 100%);
  color: #ffffff;
  padding: 2.5rem 0 2.5rem;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
  font-weight: 700;
}

.hero .lead {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  max-width: 40rem;
}

.privacy-note {
  font-size: 0.9rem;
  opacity: 0.9;
  max-width: 40rem;
}

.form-section {
  margin-top: -1.5rem;
}

.patient-form {
  background-color: #ffffff;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 1.75rem 1.5rem 2rem;
}

.fieldset {
  border: 1px solid #dde4ee;
  border-radius: 4px;
  padding: 1.25rem 1rem 1rem;
  margin-bottom: 1.25rem;
}

.fieldset legend {
  padding: 0 0.5rem;
  font-weight: 600;
  color: #004f9f;
}

.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.75rem;
}

.form-row label {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.required {
  color: #c0392b;
  margin-left: 0.15rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select {
  border-radius: 3px;
  border: 1px solid #cbd4e2;
  padding: 0.6rem 0.5rem;
  font-size: 1.2rem;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: #004f9f;
  box-shadow: 0 0 0 2px rgba(0, 79, 159, 0.15);
}

.inline-options {
  align-items: center;
}

.inline-options .options-group {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.checkbox-row {
  margin-top: 0.5rem;
}

.form-row-disclaimer {
  margin-top: 1rem;
}

.disclaimer-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.4;
}

.disclaimer-label input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.disclaimer-label a {
  font-weight: 600;
}

.has-error .disclaimer-label {
  color: #c0392b;
}

.field-error {
  min-height: 1rem;
  font-size: 0.8rem;
  color: #c0392b;
  margin: 5px 0;
}

.form-status {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  min-height: 1.4rem;
  padding: 0.6rem 0.75rem;
  border-radius: 4px;
  border: 1px solid transparent;
  background-color: transparent;
}

.form-status--success {
  color: #145a32;
  background-color: #d4efdf;
  border-color: #27ae60;
}

.form-status--error {
  color: #922b21;
  background-color: #f9d6ce;
  border-color: #c0392b;
}

.has-error input,
.has-error select {
  border-color: #c0392b;
}

.form-actions {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.btn-primary {
  display: inline-block;
  background-color: #004f9f;
  color: #ffffff;
  border: none;
  border-radius: 3px;
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #003a75;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.form-disclaimer {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: #555;
}

.site-footer {
  border-top: 1px solid #dde4ee;
  background-color: #ffffff;
  padding: 1rem 0;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: #777;
}

.hidden {
  display: none !important;
}

/* Modale di conferma */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
}

.modal-dialog {
  position: relative;
  z-index: 1001;
  background-color: #ffffff;
  border-radius: 4px;
  max-width: 520px;
  width: 100%;
  margin: 0 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  padding: 1.25rem 1.5rem 1.25rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #004f9f;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #555;
}

.modal-body {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 0.75rem;
}

.modal-footer {
  text-align: right;
}

@media (min-width: 768px) {
  .patient-form {
    padding: 2rem 2rem 2.25rem;
  }

  .form-row-inline {
    display: flex;
    gap: 1rem;
  }

  .form-row-inline .form-row {
    flex: 1;
  }
}
