/* FOOTNOTES */


.footnote-ref {
  font-family: var(--secondary-font);
  font-size: var(--font-size-S) !important;
  font-weight: var(--weight-bold);
  line-height: 0;
  margin-left: 0.2em;
  color: var(--secondary-color);
  color: black !important;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: 3%;
  vertical-align: super;
}


.footnote-ref:link,
.footnote-ref:visited {
  color: var(--secondary-color);
  text-decoration: none;
}


.footnote-ref:hover {
  color: var(--secondary-color);
  opacity: 0.6;
}


/* LIST */


.footnotes {
  margin-top: 48px;
  padding-top: 30px;
  /*border-top: 1px solid var(--secondary-color);*/
  font-family: var(--secondary-font);
  font-size: var(--font-size-XS);
}

.footnotes h4 {
  font-weight: var(--weight-medium);
}


.footnotes ol {
  margin: 24px 0 0;
  padding-left: 1em;
}


.footnotes ol li::marker {
  font-weight: var(--weight-semibold);
}


.footnotes li {
  margin-bottom: 24px;
}


.footnote-link,
.footnote-link:link,
.footnote-link:visited {
  color: var(--primary-color);
  text-decoration: none;
  margin-left: 0;
}


.footnote-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}


.footnote-icon {
  margin-left: 0.1em;
  vertical-align: -0.2em;
  
}


/* FUENTE */


.footnote-source {
  display: block;
  margin-top: 8px;
  font-size: var(--font-size-XS);
  color: var(--secondary-color);
}


.footnote-source a,
.footnote-source a:visited {
  color: var(--secondary-color);
  text-decoration: none;
  border-bottom: 0px dashed currentColor;
}


.footnote-source a:hover {
  /*color: var(--primary-color);*/
  color: currentColor;
  text-decoration: underline;
  border-bottom-style: solid;
}



/* -----------------------------------------
   NOTA CONTEXTUAL
----------------------------------------- */


.footnote-sheet {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  padding: 32px;
  display: grid;
  place-items: center;
  background: transparent;
  z-index: 10000;
}


.footnote-sheet[hidden] {
  display: none;
}


.footnote-sheet:focus {
  outline: none;
}



/* PANEL */


.footnote-sheet-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100dvh - 64px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 20px;
  padding: 24px;
  background-color: #fff;
  box-shadow:
    0 12px 140px rgba(0, 0, 0, 0.40);
  font-family: var(--secondary-font);
  color: var(--primary-color);
}



/* HEADER */


.footnote-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}


.footnote-sheet-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}


.footnote-sheet-title-icon {
  font-size: 20px;
  color: var(--secondary-color);
}


.footnote-sheet-label {
  font-size: var(--font-size-S);
  font-weight: var(--weight-semibold);

  color: var(--secondary-color);
}


.footnote-sheet-close {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--secondary-color);
  cursor: pointer;
}


.footnote-sheet-close .material-symbols-outlined {
  font-size: 24px;
  font-weight: 300;
}



/* CONTENT */


.footnote-sheet-content {
  font-size: var(--font-size-S);
  line-height: 1.5;
}


.footnote-sheet-content p {
  margin: 0;
}


.footnote-sheet-content a,
.footnote-sheet-content a:visited {
  color: var(--primary-color);
}


.footnote-sheet-content li {
  list-style: none;
}


/*
  La fuente sigue funcionando como metadato
  también dentro de la sheet.
*/


.footnote-sheet-content .footnote-source {
  color: var(--secondary-color);
}


.footnote-sheet-content .footnote-source a,
.footnote-sheet-content .footnote-source a:visited {
  color: var(--secondary-color);
}


.footnote-sheet-content .footnote-source a:hover {
  color: var(--primary-color);
}

.source-link-icon {
  font-size: var(--font-size-S);
  font-weight: var(--weight-semibold);
  margin-left: 0.1em;
  vertical-align: -0.2em;
}



/* -----------------------------------------
   NAVEGACIÓN ENTRE NOTAS
----------------------------------------- */


.footnote-sheet-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #00000030;
}


.footnote-sheet-nav {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--secondary-font);
  font-size: var(--font-size-XS);
  font-weight: var(--weight-medium);
  line-height: 1.2;
  color: var(--secondary-color);
  cursor: pointer;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}


.footnote-sheet-nav:hover {
  color: var(--primary-color);
}


.footnote-sheet-nav-icon {
  flex: 0 0 auto;

  font-size: var(--font-size-M);
  line-height: 1;
}


.footnote-sheet-prev {
  text-align: left;
}


.footnote-sheet-next {
  margin-left: auto;
  text-align: right;
}


.footnote-sheet-nav.is-hidden {
  visibility: hidden;
  pointer-events: none;
}