
/* Usa la tipografia globale Testo di Elementor */
.med-on-tabs,
.med-on-tabs * {
  font-family: var(--e-global-typography-text-font-family), sans-serif !important;
}

.med-on-tabs {
  width: 100%;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.med-on-tabs__nav {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 40px;
  width: 100%;
  /* Linea grigia disegnata DENTRO il box (non come border), così l'indicatore attivo non viene tagliato dall'overflow */
  border-bottom: 0;
  box-shadow: inset 0 -1px 0 #bdbdbd;
  overflow-x: auto;
  scrollbar-width: none;
}

.med-on-tabs__nav::-webkit-scrollbar {
  display: none;
}

.med-on-tabs__tab {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: 0 0 auto;
  padding: 0 0 12px;
  margin: 0;
  border: 0;
  border-bottom: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  text-align: left;
}

/* Riserva fin da subito la larghezza del testo semibold, evitando lo scatto del layout */
.med-on-tabs__tab::before {
  content: attr(data-title);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: 600;
}

.med-on-tabs__tab:hover {
  color: #008f8b;
  background: transparent;
  outline: none;
}

.med-on-tabs__tab:focus,
.med-on-tabs__tab:focus-visible {
  background: transparent;
  outline: none;
}

/* Indicatore attivo: sovrapposto alla linea grigia, senza essere tagliato */
.med-on-tabs__tab.is-active {
  font-weight: 600;
  box-shadow: none !important;
  z-index: 2;
}

.med-on-tabs__tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #000;
  z-index: 3;
}

.med-on-tabs__panel {
  display: none;
  padding-top: 20px;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.med-on-tabs__panel.is-active {
  display: block;
}

.med-on-tabs__panel > :first-child {
  margin-top: 0;
}

.med-on-tabs__panel > :last-child {
  margin-bottom: 0;
}

/* Icona PDF Med-On automatica per i link del primo tab (Area download / Allegati) */
.med-on-tabs .med-on-tabs__panel--downloads p {
  margin-top: 0;
  margin-bottom: 6px;
}

.med-on-tabs .med-on-tabs__panel--downloads a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}


.med-on-tabs .med-on-tabs__panel--downloads a:hover {
  color: #008f8b;
}

.med-on-tabs .med-on-tabs__panel--downloads a:focus {
  color: inherit;
}

.med-on-tabs .med-on-tabs__panel--downloads a::before {
  content: "";
  width: 17px;
  height: 22px;
  flex: 0 0 17px;
  background-image: url("icon_PDF.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  .med-on-tabs__nav {
  position: relative;
    gap: 20px;
  }
}
