/* Card «Ediciones anteriores» del sidebar derecho: biblioteca de NotiSalud.
   Cada enlace abre el visor de notisalud_visor.js, que ya sabe cambiar de PDF.
   El encabezado es un botón que pliega la lista (notisalud_historial.js). */
.notisalud-historial .card-header {
  padding: 0;
  border-bottom: 0;
}
.notisalud-historial .card-title {
  margin: 0;
  font-size: 1rem;
}
.notisalud-historial__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: .65rem .9rem;
  color: inherit;
  background: none;
  border: 0;
  border-radius: calc(.25rem - 1px);
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}
.notisalud-historial__toggle:hover {
  background: #f2f7fb;
}
.notisalud-historial__toggle:focus-visible {
  outline: 2px solid #00436d;
  outline-offset: -2px;
}
.notisalud-historial__toggle i:first-child {
  color: #9a2029;
}
.notisalud-historial__toggle-texto {
  flex: 1;
}
.notisalud-historial__total {
  color: #6c757d;
  font-size: .85em;
  font-weight: 400;
}
.notisalud-historial__chevron {
  flex: 0 0 auto;
  color: #6c757d;
  font-size: .8rem;
  transition: transform .18s ease;
}
.notisalud-historial__toggle[aria-expanded="true"] {
  border-bottom: 1px solid #eef2f5;
  border-radius: calc(.25rem - 1px) calc(.25rem - 1px) 0 0;
}
.notisalud-historial__toggle[aria-expanded="true"] .notisalud-historial__chevron {
  transform: rotate(180deg);
}

.notisalud-historial__cuerpo {
  max-height: 320px;
  padding: .4rem .6rem .6rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c6d2dc transparent;
}
.notisalud-historial__cuerpo::-webkit-scrollbar {
  width: 8px;
}
.notisalud-historial__cuerpo::-webkit-scrollbar-thumb {
  background: #c6d2dc;
  border-radius: 4px;
}

.notisalud-historial__anio {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: .5rem 0 .3rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6c757d;
  background: #fff;
}
.notisalud-historial__anio::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e6ebf0;
}

.notisalud-historial__lista {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notisalud-historial__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px;
  border-radius: 6px;
  color: #212529;
  text-decoration: none;
  transition: background-color .15s ease;
}
.notisalud-historial__item:hover,
.notisalud-historial__item:focus-visible {
  background: #eaf3f8;
  color: #00436d;
  text-decoration: none;
}
.notisalud-historial__item:focus-visible {
  outline: 2px solid #00436d;
  outline-offset: 1px;
}

.notisalud-historial__portada {
  flex: 0 0 auto;
  width: 38px;
  height: 50px;
  object-fit: cover;
  object-position: top;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.notisalud-historial__portada--sin {
  display: grid;
  place-items: center;
  color: #9a2029;
  background: #eaf3f8;
  font-size: 1.1rem;
}

.notisalud-historial__mes {
  flex: 1;
  font-size: .92rem;
  font-weight: 600;
}

.notisalud-historial__flecha {
  flex: 0 0 auto;
  font-size: .7rem;
  color: #9aa7b1;
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
}
.notisalud-historial__item:hover .notisalud-historial__flecha,
.notisalud-historial__item:focus-visible .notisalud-historial__flecha {
  opacity: 1;
  transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
  .notisalud-historial__item,
  .notisalud-historial__flecha,
  .notisalud-historial__chevron {
    transition: none;
  }
}
