/* Questo file contiene le definizioni di default */
/* Le personalizzazioni vanno in custom.css */

:root {
  --primary: #0071c9;
  --on-primary: #fff;
  --hilight: color-mix(in oklab, var(--primary) 89%, #000);
  --on-hilight: #fff;
  --link: color-mix(in oklab, var(--primary) 80%, #000);
  --text: #222;
  /* il colore di fondo per i pannelli leftside e topside */
  --bg: var(--primary);
  --on-bg: var(--on-primary);
  /* il separatore predefinito dei link */
  --idp-link-separator: '|';
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: 'Titillium Web';
  color: #222;
  color: var(--text);
}

h1,
a,
.nav-link {
  color: #0071c9;
  color: var(--primary);
}

a {
  text-decoration: none;
  font-weight: bold;
}

a:focus,
a:hover {
  color: #005295;
  color: var(--link);
}
a:hover {
  text-decoration: underline;
}

/* Sovrascrive i colori Bootstrap */
.btn-primary {
  --bs-btn-color: var(--on-primary);
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-color: var(--on-hilight);
  --bs-btn-hover-bg: var(--hilight);
  --bs-btn-hover-border-color: var(--hilight);
  --bs-btn-active-color: var(--on-hilight);
  --bs-btn-active-bg: var(--hilight);
  --bs-btn-active-border-color: var(--hilight);
  --bs-btn-disabled-color: var(--on-primary);
  --bs-btn-disabled-bg: var(--primary);
  --bs-btn-disabled-border-color: var(--primary);
  --bs-btn-focus-box-shadow: 0 0 0 0.25rem color-mix(in oklab, var(--primary) 50%, transparent);
  font-weight: bold;
}
.btn-primary:focus-visible {
  --bs-btn-focus-box-shadow: 0 0 0 0.25rem color-mix(in oklab, var(--hilight) 50%, transparent);
}

.nav {
  justify-content: center;
}

.nav-tabs .nav-item {
  max-width: 150px;
  line-height: 1.2em;
  display: inline-grid;
  min-height: 3rem;
}

.nav-tabs .nav-link {
  border-width: 0 0 5px 0;
  min-width: 120px;
}

.nav-tabs .nav-link.active {
  border-bottom-color: #0071c9;
  border-bottom-color: var(--primary);
  color: #0071c9;
  color: var(--primary);
  font-weight: 900;
}

.nav-tabs .nav-link:focus,
.nav-tabs .nav-link:hover {
  color: #005295;
  color: var(--link);
}

.idp-leftside,
.idp-topside {
  background-color: #f0f0f0;
  background-color: var(--bg);
  color: #000;
  color: var(--on-bg);
  padding: 30px;
  align-items: center;
  justify-content: center;
  position: relative;
}
.idp-leftside {
  display: flex;
  overflow: hidden;
  flex: 0 0 41.66666667%;
}
.idp-topside {
  display: none;
}

.idp-rightside {
  padding-left: 0;
  padding-right: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 100%;
  scrollbar-gutter: stable;
  overflow: auto;
}

.idp-authside {
  padding-top: 60px;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
  flex: 1 0 auto;
}

.idp-authside-header {
  padding-bottom: 50px;
  margin-left: 1rem;
  margin-right: 1rem;
}

.idp-authside-header p {
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 0;
}

.idp-authside-header h1 {
  text-align: center;
  font-weight: 900;
}

.idp-spidnotfound-header {
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.idp-auths-form label {
  font-weight: 700;
}

.right-leveling {
  margin-top: 21px;
}

.idp-footer {
  margin-top: 4rem;
  color: #222;
  color: var(--text);
  text-align: center;
  padding: 1rem;
}

/* i link senza separatori su singola riga, per default e per la classe specifica */
.idp-link-block .idp-link,
.idp-link {
  display: block;
}
/* i link sono in linea */
.idp-link-inline .idp-link {
  display: inline-block;
}
/* ed il link che segue un altro link ha un separatore */
.idp-link-inline .idp-link + .idp-link:before {
  display: inline-block;
  content: '|';
  content: var(--idp-link-separator);
  margin: 0 0.3em;
  opacity: 0.4;
}

.sp-logout {
  display: flex;
  justify-content: center;
  font-size: 1.2rem;
  margin-top: 1rem;
  margin-bottom: 0;
  font-weight: bold;
}

.idp-auth-spid-form {
  width: min-content;
  max-width: none;
  padding: 0px;
}

.idp-footer-spid {
  padding: 60px 50px 0;
}

.idp-footer-spid-logo {
  width: 280px;
  margin-bottom: 20px;
}

.idp-auths-links,
.idp-auths-form,
.idp-auths-info,
.idp-auths-btn {
  padding: 30px 50px 0;
}

.spid-idp-support-link {
  list-style: none;
}

.spid-idp-button .spid-idp-button-menu li > a img {
  height: 45px !important;
}

.eidas-idp-btn-desc {
  width: 240px;
  color: #0066cc;
}

.form-check-label-mod {
  display: inline;
  padding-left: 4px;
}

.sp-info {
  margin-top: 0.9rem;
}

.sp-info-logo {
  max-width: 200px;
  max-height: 60px;
  margin-bottom: 0.3rem;
}

.back-to-home {
  text-align: center;
  font-size: 1.2rem;
  margin-top: 1rem;
}

.user-list {
  max-width: 500px;
  margin: 1rem auto;
  padding: 0 1.5rem;
}

.list-group-item.active {
  background-color: #0071c9;
  background-color: var(--primary);
  border-color: #0071c9;
  border-color: var(--primary);
}

.alert a {
  color: inherit !important;
}
.alert-icon {
  font-size: 2rem;
  margin: -0.5rem 1rem -0.5rem 0;
  vertical-align: middle;
}

.btn-external {
  font-family: inherit;
  font-size: 17.25px;
  font-weight: normal;
  white-space: nowrap;
  vertical-align: middle;
  touch-action: manipulation;
  user-select: none;
  border: none;
  border-radius: 0;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background-color: #ddd;
  color: #000;
  padding: 0;
}
.btn-external:hover,
.btn-external:focus {
  background-color: #bbb;
}
.btn-external img {
  width: 2em;
  height: 2em;
  padding: 8px;
  box-sizing: content-box;
  border-right: 2px solid #fff4;
}
.btn-external span {
  padding: 0 8px;
}

.idp-main-container {
  display: flex;
  height: 100%;
  overflow: hidden;
}

.idp-logo {
  max-width: 100%;
  max-height: 100%;
}
.idp-topside .idp-logo {
  max-height: 90px;
}
.idp-logo-link {
  display: contents;
}

/* Layout a 1 colonne */
:root.idp-layout1 .idp-leftside {
  display: none;
}
:root.idp-layout1 .idp-topside {
  display: flex;
}
:root.idp-layout1 .idp-authside {
  padding-top: 20px;
}
:root.idp-layout1 .idp-rightside {
  scrollbar-gutter: unset;
}

/* Forza le sfumature con il colore primario */
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.25rem #0071c940;
  box-shadow: 0 0 0 0.25rem color-mix(in oklab, var(--primary) 25%, transparent);
  border-color: #0071c97f;
  border-color: color-mix(in oklab, var(--primary) 50%, transparent);
}
.btn-check:focus + .btn-primary,
.btn-unstyled:focus {
  box-shadow: 0 0 0 0.25rem #0071c980;
  box-shadow: 0 0 0 0.25rem color-mix(in oklab, var(--primary) 50%, transparent);
}
:focus-visible {
  outline: 2px solid currentColor;
}
.nav-link:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.25rem #0071c980;
  box-shadow: 0 0 0 0.25rem color-mix(in oklab, var(--primary) 50%, transparent);
}
.alert-primary {
  --bs-alert-color: color-mix(in oklab, var(--primary) 45%, #000);
  --bs-alert-link-color: var(--bs-alert-color);
  --bs-alert-bg: color-mix(in oklab, var(--primary) 27%, #fff);
  --bs-alert-border-color: #0004;
}

/* Remove password reveal in Edge */
::-ms-reveal {
  display: none;
}

/* Popover dismiss */
.popover-dismiss .popover-header:after {
  content: '\d7';
  color: #0071c9;
  color: var(--primary);
  position: absolute;
  top: 0;
  right: 4px;
  font-size: 20px;
  text-decoration: none !important;
  cursor: pointer;
}

.logout-redirect {
  margin-top: 2rem;
}

/* Nascondo la tab list se c'è un solo tab */
:root.hide-single-tab #idp-auths:not(:has(li + li)) {
  display: none;
}

/* Versione per compatibilità con IE: <template> è visibile */
template {
  display: none;
}
