/* Alanews Trends Bar — stile editoriale Corriere — v1.5 */

/* Wrapper full-width: sfondo bianco + centratura forzata della barra interna */
.alanews-trends-bar-wrap {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  background: #fff;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}

/* Barra interna: max-width controllata via inline style (container_max_width_px) */
.alanews-trends-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  /* gap + max-width impostati inline dal renderer */
  padding: 4px 16px 10px;
  width: 100%;
  /* margin auto come fallback se il wrapper viene sovrascritto dal tema */
  margin-left: auto;
  margin-right: auto;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.4;
  min-height: 36px;
  overflow-x: visible;
  flex-wrap: wrap;
  row-gap: 6px;
  box-sizing: border-box;
}
.alanews-trends-bar > * {
  flex-shrink: 0;
}
.alanews-trends-bar::-webkit-scrollbar { display: none; }

.alanews-tb-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.alanews-tb-head {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 6px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
}
.alanews-tb-title {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.alanews-tb-head .alanews-tb-icon {
  flex-shrink: 0;
  /* width/height ora gestiti via attributi SVG (icon_size_px) */
}

.alanews-tb-list {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* v1.5: stile applicato al <li>, non al link */
.alanews-tb-item {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 12px;
  white-space: nowrap;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1;
  /* font-size, color, font-weight, font-style impostati inline dal renderer */
}

/* v1.5: link puliti — eredita tutto dal <li>, nessun decoro di default */
.alanews-tb-item a {
  color: inherit;
  font: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.alanews-tb-item a:hover {
  text-decoration: underline;
}

.alanews-tb-item.is-pinned { color: #dc2626; }

/* Separatori "|" sottili neri */
.alanews-tb-sep {
  color: #000;
  font-weight: 100;
  font-style: normal;
  opacity: 1;
}
.alanews-tb-sep-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  flex-shrink: 0;
  background: transparent !important;
  color: #000;
  font-weight: 100;
  font-style: normal;
  line-height: 1;
}
.alanews-tb-sep-group::before {
  content: '|';
}

@media (max-width: 640px) {
  .alanews-trends-bar-wrap.is-desktop-only { display: none; }
  .alanews-trends-bar {
    justify-content: flex-start;
    padding: 2px 12px 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    row-gap: 0;
  }
  .alanews-tb-group { gap: 8px; }
  .alanews-tb-list { gap: 8px; }
  /* v1.5.10: nascondi label testuali dei gruppi su mobile, lascia solo icone */
  .alanews-tb-head .alanews-tb-title { display: none !important; }
}
