/* Imágenes */
.md-typeset img {
  border-radius: 8px;
  box-shadow: 0 0px 14px rgba(0, 0, 0, 0.15);
  margin: 1.5em 0;
  transition: box-shadow 0.3s ease;
}

/* Iconos en línea */
.md-typeset span.inline-icon {
  display: inline;
  line-height: 1;
}

.md-typeset span.inline-icon img,
.md-typeset img.inline-icon {
  margin: 0 0.25em !important;
  vertical-align: middle;
  display: inline !important;
  width: auto;
  height: auto;
  max-height: none;
}

/* Efecto al hacer clic (resaltado permanente) */
.code-line-highlight {
  transition: background-color 0.2s ease-in-out;
}

.md-nav__link::after,
.md-nav__title::after {
  content: "";
}

.md-nav__link::first-letter,
.md-nav__title::first-letter {
  text-transform: capitalize;
}

/* Ítems con submenús (etiquetas de sección) */
.md-nav__item > label,
.md-nav__link {
  margin-bottom: 6px;
}

/* Tipografía general */
body {
  line-height: 1.7;
  font-weight: 400;
}

/* Espaciado y estilo de títulos
   Dos notas para quien lo toque:
   1. Las reglas deben ir prefijadas con .md-typeset. Sin el prefijo, los estilos
      propios de Material (h1 en peso 300 y al 54 % de opacidad) ganan por
      especificidad y los títulos quedan sin contraste.
   2. Roboto solo se carga en 300, 400 y 700. Cualquier peso por encima de 500 se
      resuelve como el Bold real, así que 600 y 700 se ven igual de gruesos.
      La jerarquía se apoya en el tamaño y en el filete del h2, no en el peso. */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  font-weight: 400;
  color: var(--md-default-fg-color);
  letter-spacing: -0.01em;
}

.md-typeset h1 {
  margin-bottom: 0.7em;
}

/* El filete separa visualmente cada sección en páginas largas con capturas */
.md-typeset h2 {
  margin-top: 2.2em;
  margin-bottom: 0.9em;
  padding-bottom: 0.25em;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.md-typeset h3 {
  margin-top: 1.8em;
  margin-bottom: 0.6em;
}

.md-typeset h4 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

/* Tablas */
table {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 2em 0;
}

table th {
  background-color: var(--md-primary-fg-color);
  color: white;
  font-weight: 600;
  padding: 1em;
}

table th.filename {
  color: inherit !important;
}

table td {
  padding: 0.8em 1em;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

table tr:hover {
  background-color: var(--md-default-fg-color--lightest);
}

/* Enlaces */
.md-typeset a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-bottom-color 0.4s ease;
}

.md-typeset a:hover {
  border-bottom-color: var(--md-primary-fg-color);
}

/* Eliminar línea azul en enlaces que contienen imágenes */
.md-typeset a:has(img) {
  border-bottom: none !important;
}

.md-typeset a:has(img):hover {
  border-bottom: none !important;
}

/* Badges */
span.title.badge.badge-normal {
  background-color: #dae5fc !important;
  color: #ffffff !important;
  font-size: 0.75rem;
  padding: 0.2em 0.6em;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

span.title.badge .twemoji {
  border: 1px solid #ffffff;
  border-radius: 4px;
  padding: 1px;
  background-color: rgba(219, 222, 248, 0.2);
}

/* Eliminar estilos especiales de bloques de código si existen */
.md-typeset .highlight {
  background: inherit;
  box-shadow: none;
  border-radius: 0;
  margin: 1em 0;
}

.md-typeset .highlight pre {
  background: inherit;
  border: none;
  box-shadow: none;
}

.version-link {
  display: inline-flex;
  align-items: stretch;
  border: 1.5px solid rgb(225, 229, 253);
  border-radius: 2px;
  font-size: 0.9em;
  overflow: hidden;
}

.version-link t:first-of-type {
  color: #3d5cc2;
  background-color: rgb(225, 229, 253);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-right: 1.5px solid rgb(225, 229, 253);
}

.version-link t:last-of-type {
  background-color: white;
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.version-link t:first-of-type img {
  width: 20px;
  height: 20px;
}