/* Garanzia Legale - stili front office
 * Il banner e' un segnaposto grafico: colori e misure si cambiano dalle variabili qui sotto.
 */

.gl-banner,
.gl-modal,
.gl-content {
  --gl-accent: #003399;      /* blu UE */
  --gl-accent-soft: #eef2fa;
  --gl-border: #d3dbeb;
  --gl-text: #1d2433;
}

/* ---------- Banner ---------- */

.gl-banner {
  margin: 1rem 0;
  clear: both;
}

.gl-banner__link,
.gl-banner__link:hover,
.gl-banner__link:focus {
  display: flex;
  align-items: center;
  padding: .7rem .9rem;
  border: 1px solid var(--gl-border);
  border-left: 4px solid var(--gl-accent);
  border-radius: 4px;
  background: var(--gl-accent-soft);
  color: var(--gl-text);
  text-decoration: none;
  line-height: 1.35;
}

.gl-banner__link:hover {
  border-color: var(--gl-accent);
}

.gl-banner__link:focus-visible {
  outline: 2px solid var(--gl-accent);
  outline-offset: 2px;
}

.gl-banner__icon {
  flex: 0 0 auto;
  margin-right: .75rem;
  color: var(--gl-accent);
  line-height: 0;
}

.gl-banner__body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  font-size: 14px;
}

.gl-banner__text {
  margin-right: .5rem;
  margin-bottom: .25rem;
  font-weight: 600;
}

.gl-banner__cta {
  color: var(--gl-accent);
  text-decoration: underline;
}

/* ---------- Link nel footer ---------- */

.gl-footer {
  clear: both;
  width: 100%;
  padding: .5rem 0;
  text-align: center;
}

.gl-footer__link {
  text-decoration: underline;
}

/* ---------- Banner nel footer ---------- */

#footer .gl-banner {
  text-align:center;
}
#footer .gl-banner__link {
  display: inline-flex;
  max-width:400px;
}

/* ---------- Contenuto (pagina e popup) ---------- */

/* Il testo eredita colore e font del tema (nessun colore imposto). */

.gl-content__grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -1rem;
}

.gl-content__notice,
.gl-content__text {
  padding: 0 1rem;
  box-sizing: border-box;
  width: 100%;
}

.gl-content__notice {
  margin-bottom: 1.5rem;
}

.gl-content .btn-primary {
  background:var(--gl-accent)!important;
  color:#fff!important;
}

@media (min-width: 768px) {
  .gl-content__notice,
  .gl-content__text {
    width: 50%;
  }
  .gl-content__notice:only-child,
  .gl-content__text:only-child {
    width: 100%;
  }
}

.gl-content__image-link {
  display: block;
  border: 1px solid var(--gl-border);
  cursor: zoom-in;
}

.gl-content__image {
  display: block;
  width: 100%;
  height: auto;
}

.gl-content__actions {
  margin-top: 1rem;
}

.gl-content__youreurope {
  margin: .75rem 0 0;
  overflow-wrap: anywhere;
}

.gl-content__modal-footer {
  padding: 0 1.25rem 1.25rem;
  text-align: center;
}

.gl-content__modal-footer .gl-content__youreurope {
  margin: 0;
  font-size:0.875rem;
}
.gl-content__modal-footer .gl-content__youreurope a {
  color: var(--gl-accent)!important;  
}

/* Indicazione per ingrandire: solo su schermi stretti */
.gl-content__zoom-hint {
  display: none;
  margin: .5rem 0 0;
  font-size: .85rem;
  text-align: center;
  opacity: .75;
}

.gl-content__pdf {
  margin: 0 .75rem .5rem 0;
}

.gl-content__size {
  font-weight: normal;
  opacity: .8;
}

.gl-content__subtitle,
.gl-content h3 {
  margin:1rem 0;
  font-size:1.5rem;
}

.gl-content__transcription > :last-child {
  margin-bottom: 0;
}

.gl-content__report {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gl-border);
}

/* ---------- Popup ---------- */

html.gl-modal-open,
html.gl-modal-open body {
  overflow: hidden;
}

.gl-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.gl-modal[hidden],
.gl-lightbox[hidden] {
  display: none;
}

.gl-modal__backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(10, 16, 32, .6);
  opacity: 0;
  transition: opacity .2s ease;
}

.gl-modal.is-open .gl-modal__backdrop {
  opacity: 1;
}

.gl-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 840px;
  max-height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
  opacity: 0;
  -webkit-transform: translateY(16px) scale(.98);
  transform: translateY(16px) scale(.98);
  transition: opacity .2s ease, -webkit-transform .2s ease;
  transition: opacity .2s ease, transform .2s ease;
}

.gl-modal.is-open .gl-modal__dialog {
  opacity: 1;
  -webkit-transform: none;
  transform: none;
}

.gl-modal__dialog:focus {
  outline: none;
}

.gl-modal__status {
  padding: 2rem 1.25rem;
  text-align: center;
}

/* Barra in testata del popup: titolo + scarica / apri pagina / chiudi */
.gl-toolbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem .75rem 1.25rem;
  border-bottom: 1px solid var(--gl-border);
  background: #fff;
}

.gl-toolbar__title {
  flex: 1 1 0;
  min-width: 0;
  margin: .25rem 1rem .25rem 0;
  font-size: 1rem;
  line-height: 1.3;
}

.gl-toolbar__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.gl-toolbar__btn,
.gl-toolbar__btn:hover,
.gl-toolbar__btn:focus,
.gl-toolbar__btn:visited {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: 2.25rem;
  margin-top: 0;
  margin-bottom: 0;
  margin-left: .5rem;
  padding: .35rem .75rem;
  border: 1px solid var(--gl-border);
  border-radius: 4px;
  background: #fff;
  color: var(--gl-accent)!important;
  font: inherit;
  font-size: .9rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.gl-toolbar__btn:first-child {
  margin-left: 0;
}

.gl-toolbar__btn:hover {
  border-color: var(--gl-accent);
  color: var(--gl-accent);
}

.gl-toolbar__btn:focus-visible {
  outline: 2px solid var(--gl-accent);
  outline-offset: 2px;
}

.gl-toolbar__btn--primary,
.gl-toolbar__btn--primary:hover,
.gl-toolbar__btn--primary:focus {
  border-color: var(--gl-accent);
  background: var(--gl-accent);
  color: #fff!important;
  font-weight:600;
}

.gl-toolbar__icon {
  flex: 0 0 auto;
  margin-right: .4rem;
}

.gl-toolbar--status .gl-toolbar__close {
  font-size: 1.5rem;
}

.gl-content__modal-image {
  padding: 1.25rem;
}

.gl-content__modal-image .gl-content__image-link {
  max-width: 640px;
  margin: 0 auto;
}

/* Su schermi stretti i pulsanti mostrano solo l'icona */
@media (max-width: 575px) {
  .gl-modal {
    padding: 0;
  }
  .gl-modal__dialog {
    height: 100%;
    border-radius: 0;
  }
  .gl-toolbar__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .gl-toolbar__icon {
    margin-right: 0;
  }
  .gl-toolbar__btn {
    padding: .35rem .55rem;
  }
  .gl-content__modal-image {
    padding: 1rem;
  }
  .gl-content__modal-footer {
    padding: 0 1rem 1rem;
  }
  .gl-content__zoom-hint {
    display: block;
  }
  .gl-content {
	padding-bottom:4rem;
  }
}

/* ---------- Lightbox immagine ---------- */

.gl-lightbox {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100010;
  overflow: auto;
  background: rgba(10, 16, 32, .92);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity .2s ease;
}

.gl-lightbox.is-open {
  opacity: 1;
}

.gl-lightbox__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 100%;
  padding: 1rem;
}

.gl-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 2rem);
  width: auto;
  height: auto;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}

.gl-lightbox__close {
  position: fixed;
  top: .75rem;
  right: .75rem;
  z-index: 1;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: #1d2433;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.gl-lightbox__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Su smartphone l'avviso ridotto alla larghezza dello schermo non e' leggibile:
   nella lightbox lo si mostra alla sua larghezza reale e si scorre in ogni direzione. */
@media (max-width: 767px) {
  .gl-lightbox__stage {
    display: block;
    width: -webkit-max-content;
    width: max-content;
    min-height: 0;
    padding: 4rem 1rem 1rem;
  }
  .gl-lightbox__image {
    max-width: none;
    max-height: none;
    width: 980px;
    width: min(1000px, 250vw);
  }
}

/* Chi ha chiesto meno animazioni al sistema operativo non vede transizioni */
@media (prefers-reduced-motion: reduce) {
  .gl-modal__backdrop,
  .gl-modal__dialog,
  .gl-lightbox {
    transition: none;
  }
}
