/* Stili custom per nanorolf, caricati dopo Bulma. */


/* ridefinisco alcuni colori primari */
:root {
  /* azzurro */
  --bulma-link-h: 203deg;
  --bulma-link-s: 100%;
  --bulma-link-l: 40%;  
  --nanorolf-visited-link-lightness: 25%;
}


/* Separatori sottili con lo stesso colore adattivo dei bordi delle card. */
hr {
  --bulma-hr-height: 1px;
  --bulma-hr-background-color: var(--bulma-border-weak);
}


/* Font primario caricato dalla directory assets. */
/* https://fonts.google.com/specimen/Inter */
@font-face {
  font-family: "InterSemiBold";
  src: url("../fonts/Inter_24pt-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "InterSemiBoldItalic";
  src: url("../fonts/Inter_24pt-SemiBoldItalic.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "InterLight";
  src: url("../fonts/Inter_24pt-Light.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "InterLightItalic";
  src: url("../fonts/Inter_24pt-LightItalic.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}


/* Override del font primario su tutto il sito. */
body {
  font-family: "InterSemiBold", Arial, Helvetica, sans-serif;
}


.modal {
  --bulma-modal-card-head-padding: 1rem;
}

/* Archivio con elenco indipendente dall'anteprima dell'edizione selezionata. */
#archived-editions-warning {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  width: min(360px, calc(100vw - 32px));
  padding-right: 40px;
}
#archived-editions-modal .modal-card {
  width: calc(100vw - 32px);
  max-width: none;
  height: calc(100vh - 32px);
  height: calc(100dvh - 32px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: 16px;
}
#archived-editions-modal .modal-card-head {
  flex-shrink: 0;
  gap: 12px;
}
#archived-editions-modal .modal-card-title {
  flex-shrink: 1;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
#archived-editions-modal .archived-editions-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.archived-editions-list {
  flex: 0 0 220px;
  padding: 12px;
  overflow-y: auto;
  border-right: 1px solid var(--bulma-border);
}
.archived-editions-list .archived-edition-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.archived-edition-row > a[target="archived-edition-preview"] {
  flex: 1;
  min-width: 0;
}
.archived-edition-row > .icon {
  flex-shrink: 0;
}
.archived-editions-list .archived-edition-new-tab {
  display: inline-flex;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  padding: 0;
}
.archived-edition-preview {
  display: block;
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: var(--bulma-body-background-color);
}
@media screen and (max-width: 768px) {
  #archived-editions-modal .modal-card {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    margin: 8px;
  }
  #archived-editions-modal .archived-editions-layout {
    flex-direction: column;
  }
  .archived-editions-list {
    flex: 0 1 auto;
    max-height: 25%;
    border-right: 0;
    border-bottom: 1px solid var(--bulma-border);
  }
  .archived-edition-preview {
    min-height: 0;
  }
}


/* scollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
  border-radius: 3px;
}
::-webkit-scrollbar-track {
  background-color: transparent;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb {
  background-color: gray;
  border-radius: 3px;
}


/* Elementi comuni (indipendenti dal theme light/dark) */
.ai_icon_inline {
  display: inline;
  font-size: 10px;
  /* padding-left: 4px; */
  vertical-align: middle;
  cursor: help;
  opacity: 0.5;
  transition: 0.3s;
}
.ai_icon_inline:hover {
  opacity: 1;
  transition: 0.3s;
}
/* button is-ghost non lo voglio mai underlined */
.button.is-ghost {
  --bulma-button-ghost-hover-decoration: none !important;
}
/* riduco un po' il padding dentro le card */
.card {
  --bulma-card-content-padding: 12px;
}
.tag .icon {
  padding-right: 16px;
  padding-left: 10px;
}


/* Elementi comuni (dipendenti dal theme light/dark) */
.archived-editions-list .archived-edition-row a:visited:not(.is-active),
.archived-editions-list .archived-edition-row.is-visited a:not(.is-active),
.news-articles .article-title:visited {
  /* Necessario per prevalere sulla classe Bulma has-text-link. */
  color: hsl(var(--bulma-info-h), var(--bulma-info-s), var(--nanorolf-visited-link-lightness)) !important;
}
@media (prefers-color-scheme: dark) {
  :root {
    --nanorolf-visited-link-lightness: var(--bulma-info-l);
  }
  /* per i bulma tag con "has-addons" voglio un colore responsive, cioè che si adatti in base al theme, per la parte sinistra del tag con addons */
  .tag-label-left {
    color: var(--bulma-grey-lighter);
    background: var(--bulma-grey-darker);
  }
}
@media (prefers-color-scheme: light) {
  .tag-label-left {
    color: var(--bulma-grey-darker);
    background: var(--bulma-grey-lighter);
  }
}



/* header & logo */
#section-header {
  padding-bottom: 24px;
}
/*
#section-header .level {
  align-items: flex-end;
}
*/
#section-header .logo-title {
  cursor: pointer;
  letter-spacing: -3px;
  line-height: 0.8em;
}
#section-header .logo-title .logo-title-main-word {
  /* font-family: "InterSemiBoldItalic"; */
  font-family: 'InterLightItalic';
}
/* La parola nella news di origine usa lo stesso colore della testata. */
#section-header .logo-title .logo-title-main-word,
.news-title-main-word {
  color: var(--bulma-warning);
}
#section-header .bias-slogan {
  font-style: italic;
  /* font-family: "InterSemiBoldItalic"; */
  font-family: 'InterLightItalic';
  text-align: center;
  margin-bottom: 8px;  
}
#section-header .bias-selector .buttons .button {
  padding-left: 12px;
  padding-right: 12px;
}
/* @media screen and (min-width: 769px) and (max-width: 1023px) { */
@media screen and (max-width: 1023px) {
  #section-header .bias-selector .buttons .button {
    padding: 6px 8px;
    font-size: 12px;
  }
}
.news-biases .bias-selector .buttons .button {
  padding: 6px 8px;
  font-size: 12px;
}
#section-header .bias-selector .buttons {
  justify-content: center;
}
.bias-selector .buttons .button {
  font-family: "InterSemiBoldItalic";
}
.bias-selector .buttons .button .bias-button-icon {
  transform: scale(1.3);
}
.bias-selector .buttons .button .bias-button-label {
  display: none;
  margin-left: 10px;
}
.bias-selector .buttons .button.is-selected .bias-button-label {
  display: inline;
}
.bias-selector.is-icon-only .buttons .button.is-selected .bias-button-label {
  display: none;
  margin-left: 6px;
}
#section-header .section-header-column-left {
  min-width: 25%;
}
/*
#section-header .section-header-column-right {
  padding-left: 0px;
}
*/
#section-header .section-header-column-right .section-header-column-right_first-row {
  column-gap: 8px;
  margin-bottom: 8px;
  justify-content: flex-end;
}
#section-header .section-header-column-right .section-header-column-right_first-row .level-right {
  column-gap: 12px;
  flex-direction: row;
}
.section-header-resources-counter {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  margin-top: 8px;
}
#section-header .section-header-resources-counter {
  margin-bottom: -4px;
}
.section-header-resources-counter > .tags {
  margin-bottom: 4px;
}
.section-header-resources-counter > .tags > .tag {
  padding-left: 6px;
  padding-right: 6px;
}
.section-header-resources-counter > span:not(.tags) {
  font-family: "InterLight";
}



/* indice delle sections dei prompts */
#section-index {
  padding-top: 8px;
  padding-bottom: 16px;
}
#section-index .buttons {
  border-top: 3px solid var(--bulma-border-weak);
  column-gap: 0.75rem;
  row-gap: 0.25rem;
  padding-top: 24px;
}
#section-index .index-item {
  max-width: 100%;
  flex-wrap: nowrap;
  justify-content: flex-start;
  line-height: 1em;
  padding: 0px;
  padding-right: 16px;
  margin-top: 4px;
  margin-bottom: 4px;
}
#section-index .index-item .index-item-label {
  text-align: left;
  text-wrap-mode: wrap;
}
/*#section-index .button.is-ghost.index-item:hover .tag {
  text-decoration: none;
}*/
#section-0-In_evidenza {
  padding-bottom: 0px;
}



/* sections dei prompts */
.last-update-label {
  font-family: "InterLight";
}
#section-0-In_evidenza .last-update-label {
  display: none;
}
.last-update-label .last-update-date {
  font-family: "InterSemiBold";
  display: block;
}
.section-prompt-header {
  border-bottom: 3px solid var(--bulma-border-weak);
  margin-bottom: 40px !important;
  padding-bottom: 0px;
}
.section-prompt-header .section-prompt-header-label {
  line-height: 0.8em;
  text-align: center;
  font-family: 'InterSemiBoldItalic';
  color: var(--bulma-card-color);
}
@media screen and (min-width: 769px) {
  .section-prompt-header {
    align-items: flex-end;
  }
  .section-prompt-header > .level-left {
    max-width: 50%;
  }
  .section-prompt-header > .level-right {
    margin-bottom: 8px;
  }
  .section-prompt-header .section-prompt-header-label {
    text-align: left;
  }
}
@media screen and (max-width: 768px) {
  /*
  .last-update-label {
    text-align: center !important;
  }
  */
  .section-prompt-header .last-update-label {
    /* padding-bottom: 12px; */
    margin-top: -16px;
    text-align: center !important;
  }
  #section-header .logo-title {
    text-align: center;
  }
  .section-header-resources-counter {
    margin-bottom: 12px;
  }
  #section-header .section-header-resources-counter {
    justify-content: center;
  }
  #section-header .section-header-column-right {
    padding-left: inherit;
  }
  #section-header .section-header-column-right .section-header-column-right_first-row {
    justify-content: center;
  }

}
.section-prompt-content {
  display: flex;
}
.section-prompt-content .news {
  padding-top: 0;
  padding-bottom: 0;
  position: relative;
}
.section-prompt-content .news.news-card-extra {
  max-height: none;
  opacity: 1;
  overflow: hidden;
  transition: max-height 320ms ease, opacity 220ms ease;
}
.section-prompt-content .news.news-card-extra.is-collapsed {
  max-height: 0;
  opacity: 0;
}
.section-prompt-content .news .news-highlighter {
  z-index: -1;
  pointer-events: none;
  position: absolute;
  top: 2px;
  left: 0px;
  width: calc(100% - 16px);
  height: calc(100% - 60px);
  margin: 8px;
  border-radius: 8px;
  /* background-color: hsl(var(--news-score-hue) var(--news-score-sat) 48% / 10% ); */
  /* background-color: hsl(var(--news-score-hue) var(--news-score-sat) 48% / 15% ); */
  background: linear-gradient(
    180deg,
    hsl(var(--bulma-link-h) 80% 48% / 15% ) 50px,
    hsl(var(--bulma-link-h) 80% 48% / 0% ) 500px
  );
  /*
  background: linear-gradient(
    180deg,
    hsl(var(--bulma-link-h) 80% 48% / 0% ) 0px,
    hsl(var(--bulma-link-h) 80% 48% / 0% ) 50px,
    hsl(var(--bulma-link-h) 80% 48% / 15% ) 51px,
    hsl(var(--bulma-link-h) 80% 48% / 0% ) 300px
  );
  */
  /* outline: 1px solid hsl(var(--news-score-hue) var(--news-score-sat) 48% / 15% ); */
  /* box-shadow: 0px 0px 8px hsl(var(--news-score-hue) var(--news-score-sat) 48% / 10% ); */
  /* border-top: 3px solid hsl(var(--news-score-hue) var(--news-score-sat) 48% / 100% );   */
  border-top: 3px solid hsl(var(--bulma-link-h) 80% 30% / 100% );
}
.section-prompt-content .news .news-highlighter .news-highlighter-gajardetto {
  position: absolute;
  top: -13px;
  right: 32px;
  color: hsl(var(--bulma-link-h) 80% 30% / 100% );
}
.section-prompt-content .news .news-highlighter .news-highlighter-gajardetto .news-highlighter-gajardetto-label {
  position: absolute;
  z-index: 1;
  top: 18px;
  left: 10px;
  /* color: var(--bulma-title-color); */
  font-family: "InterSemiBold";
  text-transform: uppercase;
  font-size: 10px;
  word-break: keep-all;
  text-align: center;
}
.section-prompt-content .news .news-highlighter .news-highlighter-gajardetto .news-highlighter-gajardetto-icon {
  position: absolute;
  top: 0px;
  left: 0px;
  font-size: 32px;
}
.section-prompt-content .card {
  box-shadow: none;
  border-radius: 0;
}
.section-prompt-content .news .card {
  padding-top: 28px;
  padding-bottom: 28px;
  background-color: transparent;
}
.section-prompt-content .card .card-content .tags-list-label {
  font-family: "InterLight";
}
.section-prompt-content .card .card-content.news-header {
  padding: 0px;
  margin-bottom: 6px;
}
/* Il colore usa lo score normalizzato tra minimo e massimo di tutta la pagina. */
.news-score-dot {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  flex-shrink: 0;
  margin-right: 0.375rem;
  border-radius: 50%;
  background-color: hsl(var(--news-score-hue), var(--news-score-sat), 48%);
}
.section-prompt-content .card .card-content.news-header .news-header-prompt {
  font-family: "InterSemiBold";
  text-transform: uppercase;
  line-height: 1.2em;
  padding-top: 6px;
  padding-bottom: 2px;
}
.section-prompt-content .card .news-image {
  float: left;
  width: 40%;
  aspect-ratio: 1 / 1;
  margin: 0px 12px 4px 0;
  overflow: hidden;
  /* background: var(--bulma-grey-lighter); */
  border-radius: 4px;
}
.section-prompt-content .card .news-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-start-start-radius: 4px;
  border-start-end-radius: 4px;
}
/* Ingrandimento delle immagini solo su desktop con mouse o trackpad. */
@media screen and (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .section-prompt-content .card .news-image {
    position: relative;
    transform-origin: center;
    transition: transform 180ms ease;
  }
  .section-prompt-content .card .news-image:hover {
    z-index: 10;
    transform: scale(2);
  }
}
@media (prefers-reduced-motion: reduce) {
  .section-prompt-content .card .news-image {
    transition: none;
  }
}
.section-prompt-content .card .card-content.news-title {
  padding: 0px;
  border-bottom: var(--bulma-card-footer-border-top);
  margin-bottom: 16px;
}
.section-prompt-content .card .card-content.news-title .news-headline-text {
  color: var(--bulma-title-color);
  transition: 0.3s;
  font-family: "InterLightItalic";
}
.section-prompt-content .card .card-content.news-title .news-headline-text:hover {
  color: var(--bulma-grey);
  transition: 0.3s;
}
.section-prompt-content .card .card-content.news-summary {
  padding: 0px;
  margin-top: -4px;
  margin-bottom: 14px;
}
.section-prompt-content .card .card-content.news-summary .news-summary-text {
  font-family: "InterLight";
  line-height: 1.25rem;
}
.section-prompt-content .card .card-content .news-date-range {
  margin-bottom: 16px;
}
/* Mantiene i margini originali dell'icona dopo l'aggiunta dei tag time. */
.tag.news-date-range > .icon:first-child {
  margin-inline-start: -0.375em;
  margin-inline-end: -0.375em;
}
.section-prompt-content .card .card-content.news-biases {
  padding-top: 0px;
  padding-bottom: 14px;
}
.section-prompt-content .card .card-content.news-biases,
.section-prompt-content .card .card-content.news-sources {
  padding-left: 0px;
  padding-right: 0px;
  border-bottom: var(--bulma-card-footer-border-top);
  overflow-x: auto;
}
.section-prompt-content .card .card-content.news-sources {
  clear: both;
  max-height: 186px;
}
/* L'intero tag fonte, compreso il contatore, apre gli articoli della news. */
.news-source-toggle {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
/* .news-source-toggle:hover .tag:last-child {
  text-decoration: underline;
} */
.news-source-toggle:focus-visible {
  outline: 2px solid var(--bulma-link);
  outline-offset: 2px;
}
/* Le favicon restano remote e hanno la stessa dimensione nei due tag fonte. */
.source-favicon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-right: 5px;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 2px;
  outline: 1px solid rgb(255,255,255,0.85);
  background-color: rgb(255,255,255,0.85);
}
.section-prompt-content .card .card-content.news-info {
  padding-bottom: 0;
  padding-left: 0px;
  padding-right: 0px;
  margin-bottom: 8px;
}
.section-prompt-content .card .card-content.news-articles {
  padding-top: 8px;
  padding-bottom: 0px;
  padding-left: 16px;
  padding-right: 0px;
  margin-top: 12px;
  border-top: var(--bulma-card-footer-border-top);
  max-height: none;
  opacity: 1;
  /* overflow: hidden; */
  transition: max-height 260ms ease, opacity 180ms ease, padding-top 260ms ease, margin-top 260ms ease, border-top-color 260ms ease;
}
.section-prompt-content .card .card-content.news-articles.is-collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  margin-top: 0;
  border-top-color: transparent;
}
.section-prompt-content .card .card-content.news-articles .article {
  font-size: 12px;
  margin-top: 6px;
  margin-bottom: 12px;
  /* Margine dal bordo superiore quando lo scrollIntoView della fonte porta qui. */
  scroll-margin-top: 8px;
}
.section-prompt-content .card .card-content.news-articles .article .article-title {
  font-size: 14px;
  line-height: 16px !important;
  font-family: "InterLightItalic";
}
.section-prompt-content .card .card-content.news-articles .article .article-metadata {
  /* font-size: 12px; */
  word-wrap: break-word;
  padding-top: 6px;
  padding-bottom: 6px;
  display: flex;
  /* flex-direction: row; */
  align-items: center;
}
.section-prompt-content .card .card-content.news-articles .article .article-metadata .article-metadata-tag {
  line-height: 14px !important;
  white-space: normal;
  word-break: break-all;
  height: auto;
  padding-top: 3px;
  padding-bottom: 3px;
  margin-bottom: 4px;
}
.section-prompt-content .card .card-content .title {
  padding: 0px;
  margin-bottom: 12px;
  text-wrap: auto;
  text-align: left;
}
.section-prompt-footer {
  border-top: 1px solid var(--bulma-border-weak);
  padding-top: 16px;
  margin-top: 0px !important;  
  text-align: right;
}
/* Il divisore serve solo quando è presente il pulsante per mostrare tutte le news. */
.section-prompt-footer:not(:has(.show-all-news-toggle)) {
  border-top: 0;
}


/* footer */
.footer {
  font-family: "InterLight";
  padding-top: 72px;
  padding-bottom: 96px;
  /* Altezza dell'anteprima, comprensiva del titolo della colonna. */
  --footer-collapsed-height: 11.5rem;
  --footer-fade-height: 3rem;
}
.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 22px;
}
.footer-brand-title-separator {
  margin-top: 0px !important;
  margin-bottom: 48px !important;
}
.footer-brand .title {
  letter-spacing: -1px;
}
.footer-brand-logo {
  flex-shrink: 0;
  font-size: 2rem;
  line-height: 1;
}
.footer-brand-slogan {
  min-width: 0;
}
.footer #section-footer {
  padding-top: 0px;
  padding-bottom: 0px;  
}
.footer-column-content {
  position: relative;
  /* Include i margini dei paragrafi nella misura dell'altezza. */
  display: flow-root;
}
.footer-column.is-collapsible > .footer-column-content {
  overflow: hidden;
}
.footer-column.is-collapsible:not(.is-expanded) > .footer-column-content {
  height: var(--footer-collapsed-height);
}
.footer-column.is-collapsible > .footer-column-content::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: var(--footer-fade-height);
  /* Il colore di Bulma segue automaticamente il tema chiaro/scuro. */
  background: linear-gradient(to bottom, transparent, var(--bulma-footer-background-color));
  pointer-events: none;
  opacity: 1;
  transition: opacity 180ms ease;
}
.footer-column.is-expanded > .footer-column-content::after {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .footer-column-content::after {
    transition: none !important;
  }
}
.footer-column-toggle {
  font-family: "InterSemiBold";
}
.footer .footer-bold {
  font-family: "InterSemiBold";
}
.footer i:not(.fa-solid),
.footer .footer-italic {
  font-family: "InterLightItalic";
}
@media screen and (max-width: 1023px) {
  .footer {
    padding-left: 0px;
    padding-right: 0px;
  }
}


/* back-to-top button */
.back-to-top {
  position: fixed;
  bottom: 16px;
  right: 16px;
}
