:root {
  --border-img: #06574f;
}

/* — Base wrapper — */
.md-content {
  font-size: 17px;
}

/* — Título principal — */
.md-content h1 {
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 2rem;
  color: var(--md-primary-fg-color);
  font-weight: 600;
  animation: typing 1s steps(30, end) both;
}

.md-content h1.typing-complete {
  overflow: visible;
  white-space: normal;
}

@keyframes typing {
  from {
    max-width: 0;
  }

  to {
    max-width: 100%;
  }
}

/* — Títulos de sección H2 — */
.md-content h2 {
  margin-bottom: 1.2rem;
  padding-left: 0.85rem;
  font-weight: 700;
  transition: color 0.2s ease;
}

/* Acento vertical */
.md-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 3px;
  height: calc(100% - 0.36em);
  border-radius: 3px;
  background: var(--md-primary-fg-color);
  opacity: 0.65;
  transform: scaleY(0.85);
  transform-origin: center;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.md-content h2:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

/* — Títulos de sección H3 — */
.md-content h3 {
  margin-top: 1.6rem;
  margin-bottom: 0.7rem;
  font-weight: 700;
  color: var(--md-default-fg-color);
  transition: color 0.2s ease;
}

.md-content h3::before {
  content: "›";
  margin-right: 0.45rem;
  color: var(--md-accent-fg-color);
  font-weight: 700;
  transition: transform 0.2s ease;
}

.md-content h3:hover::before {
  display: inline-block;
  transform: translateX(3px);
}

/* — Títulos de sección H4 — */
.md-content h4 {
  font-weight: 700;
  color: var(--md-default-fg-color);
  transition: color 0.2s ease;
}

.md-content h4::before {
  content: "››";
  margin-right: 0.45rem;
  color: var(--md-accent-fg-color);
  font-weight: 700;
  transition: transform 0.2s ease;
}

.md-content h4:hover::before {
  display: inline-block;
  transform: translateX(3px);
}

details .tabbed-set,
.admonition .tabbed-set {
  margin: 0 -1em !important;
}

.md-content .admonition {
    font-size: .75rem !important;
}

.md-content h2 {
  animation: section-title-in 0.35s ease both;
}

@keyframes section-title-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.swal-md-button {
  display: inline-block;
  padding: 0.625em 1.25em;

  border: 0;
  border-radius: 0.2rem;

  background-color: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);

  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;

  cursor: pointer;

  transition:
    background-color 0.2s,
    box-shadow 0.2s;
}

/* NAV TABS */
nav.md-tabs {
  background: #06574f;
}

/* TABS */
.tabbed-set {
  overflow: hidden;
}


.tabbed-labels {
    border: 1px solid var(--md-default-fg-color--lightest);
}
.tabbed-set .tabbed-content p {
  padding-left: .5em ;
  overflow: hidden;
}

.tabbed-set blockquote,
.tabbed-set .admonition
 {
    border: none !important;
    margin: 0 !important;
    border-radius: 0;
}

.font-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: .3rem;
  margin-bottom: .5rem;
  padding: 0.25rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.3rem;
  width: fit-content;
  background-color: var(--md-default-bg-color);
}

.font-controls span {
  margin: 0 0.5rem 0 0.25rem;
  color: var(--md-default-fg-color--light);
  font-size: 0.75rem;
  font-weight: 500;
}

.font-controls button {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.45rem;

  border: 0;
  border-radius: 0.2rem;

  background-color: transparent;
  color: var(--md-default-fg-color);

  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;

  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.font-controls button:hover {
  background-color: var(--md-accent-fg-color);
  color: var(--md-accent-bg-color);
}

.font-controls button:focus-visible {
  outline: 2px solid var(--md-accent-fg-color);
  outline-offset: 2px;
}

.font-controls button:active {
  transform: translateY(1px);
}

.md-content--post .md-content__inner {
  zoom: var(--post-zoom, 1);
}
/* =========================================================
   VISTA
   ========================================================= */

.view-option {
  width: 100%;
  padding: 0.5rem 0;

  border: 0;
  background: none;

  color: inherit;
  font: inherit;
  text-align: left;

  cursor: pointer;
}

.view-option:hover,
.view-option[aria-pressed="true"] {
  color: var(--md-accent-fg-color);
}


/* =========================================================
   MODO CONCENTRADO
   ========================================================= */

.md-content--post.focus-mode {
  display: block;
}

/* Ocultar sidebar completo */
.md-content--post.focus-mode .md-sidebar--post {
  display: none !important;
}

/* Ocultar cualquier TOC */
.md-content--post.focus-mode .md-nav--secondary {
  display: none !important;
}

/* Por si Material crea otro sidebar secundario */
.md-content--post.focus-mode .md-sidebar--secondary {
  display: none !important;
}

/* Contenido ocupa todo */
.md-content--post.focus-mode .md-content__inner {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* =========================================================
   BOTÓN VISTA NORMAL
   ========================================================= */

.post-view-reset {
  position: fixed;

  right: 1rem;
  bottom: 1rem;

  z-index: 9999;

  display: none;

  align-items: center;
  gap: 0.4rem;

  padding: 0.5rem 0.75rem;

  border: 0;
  border-radius: 0.3rem;

  background: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);

  font: inherit;
  cursor: pointer;

  box-shadow: var(--md-shadow-z2);
}

/* Mostrarlo cuando haya algún modo activo */
.md-content--post.focus-mode .post-view-reset,
.md-content--post.toc-compact .post-view-reset {
  display: flex;
}

.post-view-reset:hover {
  background: var(--md-accent-fg-color);
}

.post-view-reset svg {
  width: 1rem;
  height: 1rem;
}

.mermaid  {
  display: flex;
  margin: auto;
  justify-content: center;
}
.admonition .tabbed-set ,
.admonition.inline .tabbed-set{
  border: 0;
  padding: 0 5px;
}
.admonition .no-copy.highlight,
.admonition .no-copy.highlight pre {
  margin: 0 !important;
}

.md-nav--secondary.toc-compact
> .md-nav__list
> .md-nav__item
> .md-nav {
  display: none;
}

.md-typeset .grid.first-grid {
  grid-template-columns: 65% 1fr !important;
}
@media screen and (max-width: 768px) {
  .md-typeset .grid.first-grid {
    grid-template-columns: 1fr !important;
    margin-left: -1em;
    margin-right: -1em;
  }
}
.highlight {
  overflow: auto;
}
.highlight .hll {
  background-color: #00bfa51a;
  box-shadow: 2px 0 0 0 var(--md-accent-fg-color) inset;
}

.md-typeset .admonition.example,
.md-typeset details.example {
  border-color: var(--md-accent-fg-color)
}
.md-typeset .admonition.example:focus-within,
.md-typeset details.example:focus-within {
  box-shadow:0 0 0 .2rem#00bfa51a

}

.md-typeset .example>.admonition-title,
.md-typeset .example>summary {
  background-color: #00bfa51a
}

.md-typeset .example>.admonition-title:before,
.md-typeset .example>summary:before {
  background-color: var(--md-accent-fg-color);
  -webkit-mask-image:var(--md-admonition-icon--example);
  mask-image:var(--md-admonition-icon--example)
}

/* Utilidades */
.px-1 {
  padding-left: 5px;
  padding-right: 5px;
}

.code-variable {
  display: inline;
  padding: 0 0.2em;

  font-family: var(--md-code-font-family);
  font-size: 0.85em;

  background: var(--md-code-bg-color);
  border-bottom: 1px dashed currentColor;

  white-space: nowrap;
  outline: none;
}

.code-variable:focus {
  border-bottom-style: solid;
}

.highlight {
  overflow: inherit;
}

.mermaid .python-icon {
  width: 18px !important;
  height: 18px !important;
}

.mh-3 pre {
  max-height: 300px;
  overflow: auto;
}

.mh-4 pre {
  max-height: 400px;
  overflow: auto;
}

.mh-5 pre {
  max-height: 500px;
  overflow: auto;
}

.mt-0 .highlighttable,
.mt-0 .filename,
.mt-0 {
  margin-top: 0 !important;
}

.mb-0 pre {
  margin-bottom: 0 !important;
}

.aws-button {
  background: #ff9900;
  border: 1px solid #e88b00;
  border-radius: 20px;
  color: #111;
  padding: 5px 15px;
  font-size: 14px;
  font-weight: 600;
  cursor: default;
}

.md-nav__link .md-ellipsis {
  white-space: nowrap;
}

.md-content figure img {
  border: 2px solid var(--md-primary-fg-color);
}

.border-img {
  border: 2px solid var(--md-default-fg-color--lightest);
  background: var(--md-default-fg-color--lightest);
}

.grid.cards.nh > ul > li:hover {
    box-shadow: none;
    border-color: var(--md-default-fg-color--lightest);
}


/* Disparadores */
a[data-dialog="iframe"] {
  text-decoration-style: dotted;
  text-underline-offset: 0.2em;
  cursor: zoom-in;
}

/* Diálogo */
.content-dialog {
  width: min(1100px, 94vw);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.5rem;
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  box-shadow: 0 1rem 4rem rgb(0 0 0 / 25%);
}

.content-dialog::backdrop {
  background: rgb(0 0 0 / 75%);
  backdrop-filter: blur(3px);
}

.content-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.content-dialog__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
}

.content-dialog__close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: var(--md-default-fg-color);
  cursor: pointer;
}

.content-dialog__close:hover {
  background: var(--md-default-fg-color--lightest);
}

.content-dialog__body {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.content-dialog__body iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

body.dialog-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .content-dialog {
    width: 96vw;
    max-height: 85vh;
  }
}


details .tabbed-set details {
    border: 0;
    border-radius: 0;
    margin: 0 1px;
}
