/* BOOTSTRAP - COMPATIBILITÀ CON LA 4.2.1
   Caricato subito dopo vendor/bootstrap-4.6.2.min.css e prima di bootstrap-brand.css.
   Bootstrap 4.6.2 ha cambiato alcuni dettagli rispetto alla 4.2.1 con cui è stato costruito il sito:
   queste regole (copiate dalla 4.2.1) mantengono il sito identico a prima.
   Se un domani si vuole lo stile "nuovo" di un componente basta togliere il suo blocco. */


/* --- Testo piccolo <small>/.small: 80% (la 4.6 usa 87,5%) --- */
small, .small {
  font-size: 80%;
  font-weight: 400;
}

/* --- Link senza href: prendono il colore del testo anche se hanno una classe (la 4.6 lo fa solo senza classe) --- */
a:not([href]):not([tabindex]) {
  color: inherit;
  text-decoration: none;
}
a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus {
  color: inherit;
  text-decoration: none;
}
a:not([href]):not([tabindex]):focus {
  outline: 0;
}

/* --- Menu a tendina: angoli arrotondati su prima e ultima voce --- */
.dropdown-item:first-child {
  border-top-left-radius: calc(0.25rem - 1px);
  border-top-right-radius: calc(0.25rem - 1px);
}
.dropdown-item:last-child {
  border-bottom-right-radius: calc(0.25rem - 1px);
  border-bottom-left-radius: calc(0.25rem - 1px);
}

/* --- Frecce del carosello: disegno e posizione della 4.2.1 --- */
.carousel-control-prev-icon, .carousel-control-next-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: transparent no-repeat center center;
  background-size: 100% 100%;
}
.carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3e%3c/svg%3e");
}
.carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3e%3c/svg%3e");
}

.carousel-control-prev, .carousel-control-next {
  background-position: 0% 0%;
}

/* --- Accessibilità: testo per screen reader senza margine negativo --- */
.sr-only {
  margin: 0;
}

/* --- Card affiancate (.card-deck) anche su telefono: in colonna con display flex --- */
.card-deck {
  display: flex;
  flex-direction: column;
}
@media (min-width: 576px) {
  .card-deck {
    flex-flow: row wrap;
  }
  .card-deck .card {
    display: flex;
    flex-direction: column;
  }
}
.card-body {
  min-height: auto;
}

/* --- Liste (.list-group) dentro le card: bordi sottili come nella 4.2.1 --- */
.list-group,
.list-group-flush,
.card > .list-group:first-child,
.card > .list-group:last-child {
  border-radius: 0;
}
.card > .list-group {
  border-top: 0;
  border-bottom: 0;
}
.list-group-item {
  position: relative;
  display: block;
  padding: 0.75rem 1.25rem;
  margin-bottom: -1px;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.125);
}
.list-group-item:first-child {
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
}
.list-group-item:last-child {
  margin-bottom: 0;
  border-bottom-right-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
}
.list-group-item + .list-group-item {
  border-top-width: 1px;
}
.list-group-flush > .list-group-item {
  border-width: 1px 0;
}
.list-group-flush > .list-group-item:last-child {
  border-bottom-width: 1px;
}
.list-group-flush .list-group-item {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}
.list-group-flush .list-group-item:last-child {
  margin-bottom: -1px;
}
.list-group-flush:first-child .list-group-item:first-child {
  border-top: 0;
}
.list-group-flush:last-child .list-group-item:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}
.card > .list-group:first-child .list-group-item:first-child {
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
}
.card > .list-group:last-child .list-group-item:last-child {
  border-bottom-right-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
}

/* --- Finestre popup (.modal): intestazione, piede e pulsante di chiusura della 4.2.1 --- */
button.close {
  padding: 0;
  background-color: transparent;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 1rem;
  border-bottom: 1px solid #e9ecef;
  border-top-left-radius: 0.3rem;
  border-top-right-radius: 0.3rem;
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem;
  border-top: 1px solid #e9ecef;
  border-bottom-right-radius: 0.3rem;
  border-bottom-left-radius: 0.3rem;
  flex-wrap: nowrap;
}
.modal-footer > * {
  margin: 0;
}
.modal-footer > :not(:first-child) {
  margin-left: .25rem;
}
.modal-footer > :not(:last-child) {
  margin-right: .25rem;
}
