/*
 * SoloAziende.it - restyling condiviso del corpo delle pagine frontend legacy.
 * Viene applicato solo alle pagine che header.php marca con body.sa-legacy-front.
 */
body.sa-legacy-front {
  font-family: Arial, Helvetica, sans-serif;
  background: #eef2f7;
  color: #172033;
}

body.sa-legacy-front #main_soloaziende,
body.sa-legacy-front #corpo {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto;
  padding: 28px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #e3e7ef;
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(23, 32, 51, .08);
  min-height: 120px;
}

body.sa-legacy-front #main_soloaziende:after,
body.sa-legacy-front #corpo:after {
  content: "";
  display: table;
  clear: both;
}

body.sa-legacy-front #corniceareariservata {
  width: 100% !important;
  max-width: 900px;
  margin: 0 auto !important;
  padding: 24px !important;
  box-sizing: border-box;
  background: #fff !important;
  border: 1px solid #e3e7ef !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}

body.sa-legacy-front .tabellaregistrazione,
body.sa-legacy-front #corniceareariservata table {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  border-collapse: separate;
  border-spacing: 0 5px;
  background: transparent !important;
}

body.sa-legacy-front .tabellaregistrazione td,
body.sa-legacy-front #corniceareariservata td {
  padding: 6px 4px;
  box-sizing: border-box;
  background: transparent !important;
  border: 0 !important;
}

body.sa-legacy-front .titoloblugrassetto,
body.sa-legacy-front .motto,
body.sa-legacy-front h1,
body.sa-legacy-front h2 {
  color: #0039ad !important;
  font-weight: 800 !important;
  line-height: 1.2;
}

body.sa-legacy-front .titoloblugrassetto {
  display: block;
  font-size: clamp(21px, 2.4vw, 30px) !important;
  text-align: center;
  margin: 0 0 14px;
}

body.sa-legacy-front .motto,
body.sa-legacy-front h1 {
  font-size: clamp(24px, 3vw, 34px) !important;
  margin: 0 0 20px !important;
}

body.sa-legacy-front .infodesc,
body.sa-legacy-front .diciotto,
body.sa-legacy-front .testointerno,
body.sa-legacy-front p {
  color: #39445a;
  line-height: 1.65 !important;
}

body.sa-legacy-front .intestazionecampo,
body.sa-legacy-front .intestazionecampo16,
body.sa-legacy-front .intestazionecampoGN,
body.sa-legacy-front .campo {
  color: #172033 !important;
  font-weight: 700 !important;
}

body.sa-legacy-front .asterisco,
body.sa-legacy-front .asterisconero {
  color: #d44545 !important;
  font-weight: 700;
}

body.sa-legacy-front input[type="text"],
body.sa-legacy-front input[type="email"],
body.sa-legacy-front input[type="password"],
body.sa-legacy-front input[type="number"],
body.sa-legacy-front input[type="date"],
body.sa-legacy-front input[type="tel"],
body.sa-legacy-front input[type="url"],
body.sa-legacy-front select,
body.sa-legacy-front textarea,
body.sa-legacy-front .inputLogin,
body.sa-legacy-front .inputLoginTA {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 46px;
  box-sizing: border-box;
  padding: 11px 13px !important;
  border: 1px solid #cfd7e6 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #172033 !important;
  font-size: 16px !important;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

body.sa-legacy-front textarea,
body.sa-legacy-front .inputLoginTA {
  min-height: 130px;
  resize: vertical;
}

body.sa-legacy-front input[type="text"]:focus,
body.sa-legacy-front input[type="email"]:focus,
body.sa-legacy-front input[type="password"]:focus,
body.sa-legacy-front input[type="number"]:focus,
body.sa-legacy-front input[type="date"]:focus,
body.sa-legacy-front input[type="tel"]:focus,
body.sa-legacy-front input[type="url"]:focus,
body.sa-legacy-front select:focus,
body.sa-legacy-front textarea:focus,
body.sa-legacy-front .inputLogin:focus,
body.sa-legacy-front .inputLoginTA:focus {
  border-color: #0039ad !important;
  box-shadow: 0 0 0 3px rgba(0,57,173,.10) !important;
}

body.sa-legacy-front input[type="checkbox"],
body.sa-legacy-front input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #0039ad;
  vertical-align: middle;
}

body.sa-legacy-front input[type="file"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px dashed #b8c3d8;
  border-radius: 10px;
  background: #f8faff;
}

body.sa-legacy-front .buttonSubmit,
body.sa-legacy-front .buttonSubmitHP,
body.sa-legacy-front .buttonSubmitModifica,
body.sa-legacy-front .buttonSubmitRitorna,
body.sa-legacy-front .buttonTasti,
body.sa-legacy-front button:not(.sa-mobile-label),
body.sa-legacy-front input[type="submit"],
body.sa-legacy-front input[type="button"] {
  border: 0 !important;
  border-radius: 999px !important;
  min-height: 44px;
  padding: 11px 22px !important;
  background: #0039ad !important;
  color: #fff !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(0,57,173,.16);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

body.sa-legacy-front .buttonSubmit:hover,
body.sa-legacy-front .buttonSubmitHP:hover,
body.sa-legacy-front .buttonSubmitModifica:hover,
body.sa-legacy-front .buttonSubmitRitorna:hover,
body.sa-legacy-front .buttonTasti:hover,
body.sa-legacy-front button:not(.sa-mobile-label):hover,
body.sa-legacy-front input[type="submit"]:hover,
body.sa-legacy-front input[type="button"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(0,57,173,.22);
}

body.sa-legacy-front .buttonSubmitRitorna {
  background: #fff !important;
  color: #0039ad !important;
  border: 1px solid #0039ad !important;
  box-shadow: none !important;
  margin: 0 auto;
}

body.sa-legacy-front a,
body.sa-legacy-front .menulat18,
body.sa-legacy-front .menulat16,
body.sa-legacy-front .menulatres {
  color: #0039ad !important;
}

body.sa-legacy-front a:hover {
  color: #ff7c24 !important;
}

/* Pagine semplici che hanno il form direttamente dentro #main. */
body.sa-legacy-front #main > form {
  width: min(760px, calc(100% - 32px));
  margin: 28px auto;
  padding: 28px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #e3e7ef;
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(23, 32, 51, .08);
}

body.sa-legacy-front #main > .titoloblugrassetto,
body.sa-legacy-front #main > .diciotto,
body.sa-legacy-front #main > br + .titoloblugrassetto {
  width: min(760px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Tabelle operative pubbliche (es. gestione foto) */
body.sa-legacy-front table.triven,
body.sa-legacy-front table[class*="registr"],
body.sa-legacy-front table[class*="inser"] {
  width: 100% !important;
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

body.sa-legacy-front table.triven {
  width: min(960px, calc(100% - 32px)) !important;
  margin: 24px auto !important;
  background: #fff;
  border: 1px solid #e3e7ef;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(23, 32, 51, .07);
}

body.sa-legacy-front table.triven td,
body.sa-legacy-front table.triven th {
  padding: 12px !important;
  border-bottom: 1px solid #edf0f5 !important;
  vertical-align: middle;
}

body.sa-legacy-front table.triven thead td,
body.sa-legacy-front table.triven thead th {
  background: #f5f8ff !important;
  color: #0039ad !important;
  font-weight: 800;
}

body.sa-legacy-front img {
  max-width: 100%;
  height: auto;
}

/* Card annunci già pubblicati: modernizza senza alterare la logica. */
body.sa-legacy-front .inserzionesemplice {
  background: #fff !important;
  border: 1px solid #e3e7ef !important;
  border-radius: 14px !important;
  padding: 14px !important;
  margin: 12px 0 !important;
  box-shadow: 0 7px 20px rgba(23,32,51,.06);
  overflow: hidden;
}

body.sa-legacy-front .annunciotitolo {
  color: #0039ad !important;
  font-weight: 800 !important;
}

body.sa-legacy-front .annuncioprezzo {
  color: #ff7c24 !important;
  font-weight: 800 !important;
}

body.sa-legacy-front #infoprop,
body.sa-legacy-front #popupfoto {
  border-radius: 16px !important;
  border: 1px solid #dfe5ef !important;
  box-shadow: 0 18px 45px rgba(23,32,51,.18) !important;
}

@media (max-width: 720px) {
  body.sa-legacy-front #main_soloaziende,
  body.sa-legacy-front #corpo {
    width: calc(100% - 20px);
    margin: 16px auto;
    padding: 18px 14px;
    border-radius: 14px;
  }

  body.sa-legacy-front #corniceareariservata,
  body.sa-legacy-front #main > form {
    width: 100% !important;
    padding: 18px 14px !important;
    border-radius: 14px !important;
  }

  body.sa-legacy-front .tabellaregistrazione td,
  body.sa-legacy-front #corniceareariservata td {
    display: block;
    width: 100% !important;
  }

  body.sa-legacy-front table.triven {
    width: calc(100% - 20px) !important;
    display: block;
    overflow-x: auto;
  }

  body.sa-legacy-front .buttonSubmit,
  body.sa-legacy-front .buttonSubmitHP,
  body.sa-legacy-front .buttonSubmitModifica,
  body.sa-legacy-front .buttonSubmitRitorna,
  body.sa-legacy-front input[type="submit"],
  body.sa-legacy-front input[type="button"] {
    max-width: 100% !important;
    white-space: normal;
  }
}
