/* ==========================================================================
   VistaBridge Documentation - Screenshot & Figure Caption Alignment
   ========================================================================== */

/* Ensure screenshots display as block elements aligned to the left with consistent border & styling */
.md-typeset img,
.md-typeset p > img,
.md-typeset figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid #0070c0;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 112, 192, 0.12);
  margin-top: 1rem;
  margin-bottom: 0.35rem;
  margin-left: 0;
  margin-right: auto;
}

/* Ensure paragraph containing a screenshot has tight bottom margin so caption sits close */
.md-typeset p:has(> img) {
  margin-bottom: 0.25rem;
}

/* Ensure figure captions appear consistently aligned to the left directly below screenshots */
.md-typeset p > img + em,
.md-typeset p > img + br + em,
.md-typeset p:has(> img) + p > em {
  display: block;
  text-align: left;
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 400;
  color: var(--md-default-fg-color--light, #5c6b73);
  margin-top: 0.35rem;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

/* For consecutive caption lines below the same screenshot */
.md-typeset p > img + em + em,
.md-typeset p > img + br + em + em {
  display: block;
  text-align: left;
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 400;
  color: var(--md-default-fg-color--light, #5c6b73);
  margin-top: 0.2rem;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

/* Ensure figure element images and captions are also left-aligned */
.md-typeset figure {
  margin: 1rem 0 1.25rem 0;
  text-align: left;
}

.md-typeset figure img {
  display: block;
  margin: 0;
  border: 1px solid #0070c0;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 112, 192, 0.12);
}

.md-typeset figcaption {
  display: block;
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 400;
  color: var(--md-default-fg-color--light, #5c6b73);
  margin-top: 0.35rem;
  text-align: left;
}

/* ==========================================================================
   VistaBridge Overview - Feature Cards Theming & Styling
   ========================================================================== */

.md-typeset .grid.cards > ul > li,
.md-typeset .grid.cards > ol > li {
  position: relative;
  border: 1px solid rgba(0, 150, 136, 0.18);
  border-top: 2.5px solid var(--md-primary-fg-color, #009688);
  border-radius: 6px;
  background: var(--md-default-bg-color);
  padding: 0.85rem 0.95rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.md-typeset .grid.cards > ul > li:hover,
.md-typeset .grid.cards > ol > li:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 150, 136, 0.4);
  border-top-color: var(--md-primary-fg-color, #009688);
  box-shadow: 0 6px 16px rgba(0, 150, 136, 0.12);
}

.md-typeset .grid.cards > ul > li > p:first-child,
.md-typeset .grid.cards > ol > li > p:first-child {
  display: flex;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--md-default-fg-color);
  margin-top: 0;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.md-typeset .grid.cards > ul > li .twemoji,
.md-typeset .grid.cards > ol > li .twemoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  min-width: 1.55rem;
  background: rgba(0, 150, 136, 0.08);
  color: var(--md-primary-fg-color, #009688);
  border-radius: 4px;
  margin-right: 0.45rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.md-typeset .grid.cards > ul > li .twemoji svg,
.md-typeset .grid.cards > ol > li .twemoji svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
}

.md-typeset .grid.cards > ul > li:hover .twemoji,
.md-typeset .grid.cards > ol > li:hover .twemoji {
  background: var(--md-primary-fg-color, #009688);
  color: #ffffff;
}

.md-typeset .grid.cards > ul > li > hr,
.md-typeset .grid.cards > ol > li > hr {
  border: 0;
  border-bottom: 1px solid rgba(0, 150, 136, 0.12);
  margin: 0.4rem 0 0.55rem 0;
}

.md-typeset .grid.cards > ul > li > p:last-child,
.md-typeset .grid.cards > ol > li > p:last-child {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--md-default-fg-color--light);
  margin-bottom: 0;
}
