/**
 * Pagina di verifica al login (PaginaTFA-4).
 * È nel tema pubblico: il body ha path-tfa, non path-user,
 * e il modulo non è dentro .page-wrapper.
 * Si interviene solo sul form TFA, non su header, footer o questionario.
 */
body.path-tfa #tfa-entry-form {
  --tfa-purple: #3f2183;
  --tfa-purple-soft: #6440b5;
  --tfa-ink: #17324d;
  --tfa-muted: #5c6f82;
  --tfa-line: #e4dff2;
  max-width: 36rem;
  margin: 0.5rem auto 2.5rem;
  padding: 2.5rem;
  border: 1px solid var(--tfa-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(63, 33, 131, 0.08);
  color: var(--tfa-ink);
  font-family: "Titillium Web", "Segoe UI", system-ui, sans-serif;
}

body.path-tfa .block.block-page-title-block{
	text-align:center;
}

body.path-tfa #tfa-entry-form .form-item-code label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--tfa-ink);
  font-size: 1rem;
  font-weight: 700;
}

body.path-tfa #tfa-entry-form #edit-code {
  width: 100%;
  padding: 0.8rem 0.85rem;
  border: 1px solid #cfc6e2;
  border-radius: 8px;
  background: #fff;
  color: var(--tfa-ink);
  font-size: 1.35rem;
  letter-spacing: 0.28em;
  text-align: center;
  box-shadow: none;
}

body.path-tfa #tfa-entry-form #edit-code:focus {
  border-color: var(--tfa-purple);
  outline: 2px solid rgba(63, 33, 131, 0.25);
  outline-offset: 1px;
}

body.path-tfa #tfa-entry-form .description {
  display: block;
  margin-top: 0.55rem;
  color: var(--tfa-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

body.path-tfa #tfa-entry-form #edit-change-validation-plugin {
  margin: 1.35rem 0 0;
  padding: 1rem 1rem 0.85rem;
  border: 1px solid var(--tfa-line);
  border-radius: 10px;
  background: #f8f6fc;
}

body.path-tfa #tfa-entry-form #edit-change-validation-plugin legend {
  float: none;
  width: auto;
  margin: 0 0 0.35rem;
  padding: 0;
  color: var(--tfa-ink);
  font-size: 1.05rem;
  font-weight: 700;
}

body.path-tfa #tfa-entry-form #edit-change-validation-plugin .fieldset-wrapper {
  color: var(--tfa-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

body.path-tfa #tfa-entry-form .link-list-wrapper::before {
  content: "Il codice di recupero TFA è uno dei codici monouso generati nella configurazione dell'autenticazione a due fattori. Vanno salvati dal pannello TFA e servono per accedere se non hai più l'applicazione sul tuo telefono";
  display: block;
  margin-top: 0.65rem;
  color: var(--tfa-muted);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
}

body.path-tfa #tfa-entry-form ul[data-drupal-selector="edit-other-validation-plugins"] {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

body.path-tfa #tfa-entry-form ul[data-drupal-selector="edit-other-validation-plugins"] a {
  display: inline-block;
  margin-top: 0.15rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--tfa-purple);
  border-radius: 6px;
  background: #fff;
  color: var(--tfa-purple);
  font-weight: 700;
  text-decoration: none;
}

body.path-tfa #tfa-entry-form ul[data-drupal-selector="edit-other-validation-plugins"] a:hover {
  background: #f3eefb;
}

body.path-tfa #tfa-entry-form .form-actions {
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--tfa-line);
}

body.path-tfa #tfa-entry-form .button--primary {
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--tfa-purple);
  border-radius: 6px;
  background: var(--tfa-purple);
  color: #fff;
  font-weight: 700;
}

body.path-tfa #tfa-entry-form .button--primary:hover,
body.path-tfa #tfa-entry-form .button--primary:focus {
  background: var(--tfa-purple-soft);
  border-color: var(--tfa-purple-soft);
  color: #fff;
}

@media (max-width: 640px) {
  body.path-tfa #tfa-entry-form {
    margin-left: 0;
    margin-right: 0;
    padding: 1.1rem 0.9rem;
  }

  body.path-tfa #tfa-entry-form .button--primary {
    width: 100%;
  }
}

/**
 * Pannello TFA e conferma password.
 * Vale per #tfa-base-overview e #tfa-setup. Il file va nel modulo
 * ambito_tfa e poi va svuotata la cache.
 */
body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) {
  background: #f6f4fb;
}

body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) > main > .layout-container {
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
}

body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) .content-header {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.9rem;
  margin: 0 0 0.5rem;
  padding: 0.85rem 1.5rem 0;
  background: #3f2183 !important;
  border: 0;
  box-shadow: none;
}

body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) .content-header::before {
  content: "";
  order: 1;
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.85rem;
  background: url("/sites/default/files/logo-comune83_0.webp") center / contain no-repeat;
}

body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) .content-header::after {
  content: "Ambito 4 Cernusco sul Naviglio Ente capofila Comune di Gorgonzola";
  order: 2;
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0 0 0.85rem;
  color: #fff;
  font-family: "Titillium Web", "Segoe UI", system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: pre-line;
}

body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) .content-header .layout-container {
  order: 3;
  flex: 1 1 100%;
  max-width: none;
  margin: 0;
  padding-top: 1.35rem;
  background: #f6f4fb;
}

body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) .content-header .region-breadcrumb {
  position: absolute;
  z-index: 1;
  top: 0.85rem;
  left: 1.5rem;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0;
  overflow: hidden;
}

body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) .breadcrumb,
body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) .breadcrumb__list,
body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) .breadcrumb__item {
  margin: 0;
  padding: 0;
  list-style: none;
  background: transparent;
  border: 0;
}

body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) .breadcrumb__item:first-child .breadcrumb__link {
  display: block;
  width: 3.25rem;
  height: 3.25rem;
  font-size: 0;
  color: transparent;
}

body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) .breadcrumb__item:not(:first-child) {
  display: none !important;
}

body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) #block-claro-primary-local-tasks {
  display: none !important;
}

body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) .block-page-title-block {
  text-align: center;
}

body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) .page-title {
  margin: 0 0 1rem;
  color: #17324d;
  font-size: 1.85rem;
  font-weight: 700;
}

body.path-user #tfa-base-overview {
  max-width: 36rem;
  margin: 0.5rem auto 2.5rem !important;
  padding: 2.5rem !important;
  border: 1px solid #e4dff2 !important;
  border-radius: 12px;
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(63, 33, 131, 0.08);
  font-family: "Titillium Web", "Segoe UI", system-ui, sans-serif;
}

body.path-user #tfa-base-overview > p {
  color: #5c6f82;
  line-height: 1.55;
}

body.path-user #tfa-base-overview > p:first-of-type {
  margin-top: 0;
  color: #17324d;
}

body.path-user #tfa-base-overview > p strong {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #f3eefb;
  color: #3f2183;
  font-size: 0.85rem;
}

body.path-user #tfa-base-overview .claro-details,
body.path-user #tfa-base-overview #edit-validation {
  margin: 1.25rem 0 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none;
}

body.path-user #tfa-base-overview .claro-details__summary,
body.path-user #tfa-base-overview #edit-validation > summary {
  padding: 0 0 0.6rem !important;
  border-bottom: 4px solid #d9d2ea;
  background: none !important;
  background-image: none !important;
  color: #17324d;
  font-size: 1.15rem;
  font-weight: 700;
  list-style: none;
}

body.path-user #tfa-base-overview .claro-details__summary::before,
body.path-user #tfa-base-overview .claro-details__summary::after,
body.path-user #tfa-base-overview .claro-details__summary::marker,
body.path-user #tfa-base-overview .claro-details__summary::-webkit-details-marker,
body.path-user #tfa-base-overview #edit-validation > summary::before,
body.path-user #tfa-base-overview #edit-validation > summary::marker,
body.path-user #tfa-base-overview #edit-validation > summary::-webkit-details-marker {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: none !important;
}

body.path-user #tfa-base-overview #edit-validation::after {
  content: "Nota: «Numero di volte in cui la validazione è stata saltata» conta quante volte sei entrato solo con la password, senza il codice. Il massimo consentito è 5. Raggiunto quel numero il codice diventa obbligatorio e non è più possibile saltare la verifica.";
  display: block;
  margin: 20px 0 0.4rem;
  padding: 0.95rem 1rem 1rem;
  border: 1px solid #e4dff2;
  border-radius: 8px;
  background: #f6f4fb;
  color: #17324d;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
  white-space: pre-line;
}

body.path-user #tfa-base-overview #edit-validation::after::first-line {
  color: #3f2183;
  font-size: 1.05rem;
  font-weight: 700;
}

body.path-user #tfa-base-overview h2[data-drupal-selector="edit-heading"],
body.path-user #tfa-base-overview h3[data-drupal-selector="edit-heading"] {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 1.35rem 0 0.4rem;
  color: #17324d;
  font-size: 1.2rem;
  font-weight: 700;
}

body.path-user #tfa-base-overview h3[data-drupal-selector="edit-heading"]::before,
body.path-user #tfa-base-overview h2[data-drupal-selector="edit-heading"]::before {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: #3f2183;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1;
}

body.path-user #tfa-base-overview h3[data-drupal-selector="edit-heading"]::before {
  content: "1";
}

body.path-user #tfa-base-overview h2[data-drupal-selector="edit-heading"]::before {
  content: "2";
}

body.path-user #tfa-base-overview ul {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

body.path-user #tfa-base-overview ul[data-drupal-selector="edit-setup"],
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-show-codes"] {
  display: inline-block;
  margin-right: 0.65rem;
  vertical-align: middle;
}

body.path-user #tfa-base-overview ul[data-drupal-selector="edit-setup"] a,
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-setup"] a:link,
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-setup"] a:visited,
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-link"] a,
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-link"] a:link,
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-link"] a:visited,
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-show-codes"] a,
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-show-codes"] a:link,
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-show-codes"] a:visited {
  display: inline-block !important;
  margin-top: 0.35rem !important;
  padding: 0.7rem 1.25rem !important;
  border: 1px solid #3f2183 !important;
  border-radius: 6px !important;
  background: #3f2183 !important;
  background-color: #3f2183 !important;
  color: #fff !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

body.path-user #tfa-base-overview ul[data-drupal-selector="edit-show-codes"] a,
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-show-codes"] a:link,
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-show-codes"] a:visited {
  background: #fff !important;
  background-color: #fff !important;
  color: #3f2183 !important;
}

body.path-user #tfa-base-overview ul[data-drupal-selector="edit-setup"] a span,
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-link"] a span,
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-show-codes"] a span {
  margin-right: 0 !important;
}

.link-list-wrapper ul li a span{
	margin-right: 0 !important;
}

body.path-user #tfa-base-overview ul[data-drupal-selector="edit-setup"] a span,
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-link"] a span {
  color: #fff !important;
}

body.path-user #tfa-base-overview ul[data-drupal-selector="edit-show-codes"] a span {
  color: #3f2183 !important;
}

body.path-user #tfa-base-overview ul[data-drupal-selector="edit-setup"] a:hover,
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-setup"] a:focus,
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-link"] a:hover,
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-link"] a:focus {
  background: #6440b5 !important;
  background-color: #6440b5 !important;
  border-color: #6440b5 !important;
  color: #fff !important;
}

body.path-user #tfa-base-overview ul[data-drupal-selector="edit-show-codes"] a:hover,
body.path-user #tfa-base-overview ul[data-drupal-selector="edit-show-codes"] a:focus {
  background: #f3eefb !important;
  background-color: #f3eefb !important;
  border-color: #6440b5 !important;
  color: #3f2183 !important;
}

body.path-user #tfa-setup {
  max-width: 36rem;
  margin: 0.5rem auto 2.5rem !important;
  padding: 2.5rem !important;
  border: 1px solid #e4dff2 !important;
  border-radius: 12px;
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(63, 33, 131, 0.08);
  font-family: "Titillium Web", "Segoe UI", system-ui, sans-serif;
}

body.path-user #tfa-setup .form-item__label {
  display: block;
  margin-bottom: 0.45rem;
  color: #17324d;
  font-size: 1rem;
  font-weight: 700;
}

body.path-user #tfa-setup #edit-current-pass {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0.8rem 0.85rem;
  border: 1px solid #cfc6e2 !important;
  border-radius: 8px;
  background: #fff !important;
  color: #17324d;
  font-size: 1rem;
  box-shadow: none;
}

body.path-user #tfa-setup #edit-current-pass:focus {
  border-color: #3f2183 !important;
  outline: 2px solid rgba(63, 33, 131, 0.25);
  outline-offset: 1px;
}

body.path-user #tfa-setup .form-item__description {
  margin-top: 0.55rem;
  color: #5c6f82;
  font-size: 0.95rem;
  line-height: 1.5;
}

body.path-user #tfa-setup .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid #e4dff2;
}

body.path-user #tfa-setup .button--primary {
  padding: 0.7rem 1.25rem;
  border: 1px solid #3f2183 !important;
  border-radius: 6px;
  background: #3f2183 !important;
  color: #fff !important;
  font-weight: 700;
  box-shadow: none;
}

body.path-user #tfa-setup .button--primary:hover,
body.path-user #tfa-setup .button--primary:focus {
  border-color: #6440b5 !important;
  background: #6440b5 !important;
  color: #fff !important;
}

body.path-user #tfa-setup #edit-cancel {
  padding: 0.7rem 1.25rem;
  border: 1px solid #cfc6e2 !important;
  border-radius: 6px;
  background: #fff !important;
  color: #17324d !important;
  font-weight: 700;
  box-shadow: none;
}

body.path-user #tfa-setup #edit-cancel:hover,
body.path-user #tfa-setup #edit-cancel:focus {
  border-color: #3f2183 !important;
  background: #f3eefb !important;
  color: #3f2183 !important;
}

@media (max-width: 640px) {
  body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) .content-header {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) .content-header .region-breadcrumb {
    left: 1rem;
  }

  body.path-user .page-wrapper:is(:has(#tfa-base-overview), :has(#tfa-setup)) .content-header::after {
    font-size: 1rem;
  }

  body.path-user #tfa-base-overview,
  body.path-user #tfa-setup {
    margin-left: 0;
    margin-right: 0;
    padding: 1.1rem 0.9rem !important;
  }

  body.path-user #tfa-setup .form-actions {
    flex-direction: column;
  }

  body.path-user #tfa-setup .button--primary,
  body.path-user #tfa-setup #edit-cancel {
    width: 100%;
  }

  body.path-user #tfa-base-overview ul[data-drupal-selector="edit-setup"],
  body.path-user #tfa-base-overview ul[data-drupal-selector="edit-show-codes"] {
    display: block;
    margin-right: 0;
  }

  body.path-user #tfa-base-overview ul[data-drupal-selector="edit-setup"] a,
  body.path-user #tfa-base-overview ul[data-drupal-selector="edit-link"] a,
  body.path-user #tfa-base-overview ul[data-drupal-selector="edit-show-codes"] a {
    display: block;
    text-align: center;
  }
}
