/* SUMARiS documentation site - extra styles (see mkdocs.base.yml). */

/* Header logo: the SUMARiS logo is wide (not square) and blue, so it sits
   on a white pill to stay readable on the coloured header. */
.md-header__button.md-logo {
  margin: 0 0.4rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.3rem;
  background: #fff;
}
.md-header__button.md-logo img {
  height: 1.7rem;
  width: auto;
}

/* ---------- Home page ---------- */

.home-title {
  margin-bottom: 0.4em !important;
}
.home-lead {
  font-size: 0.95rem;
  color: var(--md-default-fg-color--light);
  max-width: 46rem;
}

/* Diagram thumbnails stay on a light background in both colour schemes. */
.home-card__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f6fb;
  overflow: hidden;
}
.home-card__thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Illustrated cards: one framed block per card, the
   thumbnail always on top of its title and description. */
.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.home-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--md-default-fg-color);
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: 0.5rem;
  box-shadow: var(--md-shadow-z1);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.home-card--link:hover,
.home-card--link:focus-within {
  border-color: var(--md-accent-fg-color);
  box-shadow: var(--md-shadow-z2);
  transform: translateY(-2px);
}
.home-card__thumb {
  flex: 0 0 auto;
  height: 10rem;
  padding: 0.8rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}
.home-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 0.7rem 1rem 1rem;
}
.md-typeset .home-card__title {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--md-primary-fg-color);
}
[data-md-color-scheme="slate"] .md-typeset .home-card__title {
  color: var(--md-accent-fg-color);
}
.md-typeset .home-card__title a {
  color: inherit;
}
/* Stretched link: the whole card is clickable. */
.md-typeset .home-card--link .home-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.md-typeset .home-card__body p {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  color: var(--md-default-fg-color--light);
}
.md-typeset .home-card__body p.home-card__title {
  font-size: 0.95rem;
  color: var(--md-primary-fg-color);
}
[data-md-color-scheme="slate"] .md-typeset .home-card__body p.home-card__title {
  color: var(--md-accent-fg-color);
}

/* Profile cards (path list + button at the bottom) */
.home-cards--profiles .home-card__thumb {
  /* Same height and background for the 3 profiles (screenshots slideshow and diagrams) */
  height: 12.5rem;
  background: linear-gradient(160deg, #e8eaf6 0%, #c5cae9 55%, #9fa8da 100%);
}
.md-typeset .home-cards--profiles .home-card__body ol {
  margin: 0.2rem 0 0.8rem;
  font-size: 0.75rem;
}
.md-typeset .home-cards--profiles .home-card__body ol li {
  margin-bottom: 0.2rem;
}
.md-typeset .home-cards--profiles .md-button {
  align-self: flex-start;
  margin-top: auto;
}
.md-typeset .home-subtitle {
  margin-top: 2.2rem;
  font-size: 1.1rem;
}
/* Compact topic cards below the profiles */
.home-cards--compact {
  /* 3 columns on a desktop screen: the 6 topics fill 2 complete rows. */
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1rem;
  margin-top: 0.8rem;
}
.home-cards--compact .home-card__thumb {
  height: 6.5rem;
  padding: 0.5rem;
}
.md-typeset .home-cards--compact .home-card__body p.home-card__title {
  font-size: 0.8rem;
}
.md-typeset .home-cards--compact .home-card__body p {
  font-size: 0.68rem;
}

/* Hero banner */
.home-hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0.5rem 0 2rem;
  padding: 1.6rem 2rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, var(--md-primary-fg-color--light), var(--md-primary-fg-color--dark));
  color: var(--md-primary-bg-color);
}
.md-typeset .home-hero p {
  color: var(--md-primary-bg-color);
}
.md-typeset .home-hero .home-hero__title {
  margin-top: 0;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
}
.md-typeset .home-hero .md-button {
  margin: 0.3rem 0.4rem 0 0;
  color: var(--md-primary-bg-color);
  border-color: var(--md-primary-bg-color);
}
.md-typeset .home-hero .md-button--primary {
  color: var(--md-primary-fg-color);
  background: var(--md-primary-bg-color);
}
.home-hero__text {
  flex: 1 1 auto;
}
.home-hero__logo {
  flex: 0 0 12rem;
  padding: 0.8rem;
  border-radius: 0.5rem;
  background: #fff;
}
.home-hero__logo img {
  display: block;
  width: 100%;
}
@media screen and (max-width: 44em) {
  .home-hero {
    flex-direction: column-reverse;
    padding: 1.2rem;
  }
  .home-hero__logo {
    flex-basis: auto;
    width: 10rem;
  }
}

/* Showcase slideshow (User card): real screenshots of the App
   in a laptop + phone composition, cross-fading (see extra.js). */
.home-card__thumb.home-showcase {
  position: relative;
  display: block;
  padding: 0;
}
.md-typeset .home-showcase__slide {
  position: absolute;
  inset: 0;
  display: block;
  width: auto;
  max-width: none;
  margin: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.md-typeset .home-showcase__slide.is-active {
  opacity: 1;
}
.home-device {
  position: absolute;
  overflow: hidden;
  background: #1f2329;
  box-shadow: 0 0.4rem 1rem rgba(26, 35, 126, 0.35);
}
.md-typeset .home-device img {
  display: block;
  width: 100%;
  height: auto;
}
/* Laptop: dark bezel + keyboard base (::after) */
.home-device--laptop {
  top: 1rem;
  left: 7%;
  width: 72%;
  padding: 0.25rem;
  border-radius: 0.35rem 0.35rem 0 0;
  overflow: visible;
}
.md-typeset .home-device--laptop img {
  aspect-ratio: 1440 / 900;
  border-radius: 0.1rem;
}
.home-device--laptop::after {
  content: "";
  position: absolute;
  left: -7%;
  right: -7%;
  bottom: -0.45rem;
  height: 0.45rem;
  border-radius: 0 0 0.5rem 0.5rem;
  background: linear-gradient(#c9ccd3, #8d929c);
}
/* Phone: rounded body, overlapping the laptop */
.home-device--phone {
  right: 6%;
  bottom: 1.6rem;
  width: 21%;
  padding: 0.2rem;
  border-radius: 0.7rem;
}
.md-typeset .home-device--phone img {
  aspect-ratio: 390 / 780;
  border-radius: 0.5rem;
}
.md-typeset .home-showcase__slide figcaption {
  position: absolute;
  max-width: none;
  font-style: normal;
  left: 0.6rem;
  bottom: 0.35rem;
  margin: 0;
  padding: 0.1rem 0.45rem;
  font-size: 0.6rem;
  font-weight: 600;
  color: #fff;
  border-radius: 0.2rem;
  background: rgba(26, 35, 126, 0.75);
}
.home-showcase__dots {
  position: absolute;
  right: 0.6rem;
  bottom: 0.45rem;
  display: flex;
  gap: 0.3rem;
}
.home-showcase__dots button {
  width: 0.45rem;
  height: 0.45rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(26, 35, 126, 0.3);
  cursor: pointer;
}
.home-showcase__dots button[aria-current="true"] {
  background: #1a237e;
}
/* Tablet in landscape (auction and landing sampling scenes), centered */
.home-device--tablet {
  top: 0.9rem;
  left: 50%;
  width: 70%;
  padding: 0.35rem;
  border-radius: 0.6rem;
  transform: translateX(-50%);
}
.md-typeset .home-device--tablet img {
  aspect-ratio: 990 / 619;
  border-radius: 0.2rem;
}

/* About page: maintainer logo + text */
.about-maintainer {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.md-typeset img.about-maintainer__logo {
  width: 14rem;
  border-radius: 0.4rem;
  box-shadow: var(--md-shadow-z1);
}
@media screen and (max-width: 44em) {
  .about-maintainer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Showcase: click to enlarge, arrows shown on hover/focus */
.md-typeset .home-showcase__slide {
  cursor: zoom-in;
  pointer-events: none; /* hidden slides are stacked above: only the active one is clickable */
}
.md-typeset .home-showcase__slide.is-active {
  pointer-events: auto;
}
.home-showcase__arrow {
  position: absolute;
  top: 45%;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1.9rem;
  color: #fff;
  border: 0;
  border-radius: 50%;
  background: rgba(26, 35, 126, 0.65);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.2s, background 0.2s;
}
.home-showcase__arrow--prev { left: 0.4rem; }
.home-showcase__arrow--next { right: 0.4rem; }
.home-showcase:hover .home-showcase__arrow,
.home-showcase:focus-within .home-showcase__arrow {
  opacity: 1;
}
.home-showcase__arrow:hover,
.home-showcase__arrow:focus-visible {
  background: #1a237e;
}
.home-showcase__dots {
  z-index: 2;
}

/* Lightbox: full size screenshots */
html.home-lightbox-open {
  overflow: hidden;
}
.home-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 3.5rem 1fr 3.5rem;
  grid-template-rows: 1fr auto;
  align-items: center;
  padding: 1.5rem 0.5rem 1rem;
  background: rgba(10, 14, 40, 0.9);
}
.home-lightbox[hidden] {
  display: none;
}
.home-lightbox__figure {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: 100%;
  margin: 0;
}
.home-lightbox__figure img {
  max-width: 100%;
  max-height: calc(100vh - 11rem);
  object-fit: contain;
  border-radius: 0.4rem;
  background: #fff;
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.5);
}
.home-lightbox__figure figcaption {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
}
.home-lightbox__counter {
  font-weight: 400;
  opacity: 0.7;
}
.home-lightbox__arrow,
.home-lightbox__close {
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  font-size: 1.8rem;
  line-height: 2.4rem;
  color: #fff;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}
.home-lightbox__arrow:hover,
.home-lightbox__close:hover,
.home-lightbox__arrow:focus-visible,
.home-lightbox__close:focus-visible {
  background: rgba(255, 255, 255, 0.3);
}
.home-lightbox__arrow--prev { grid-column: 1; justify-self: center; }
.home-lightbox__arrow--next { grid-column: 3; justify-self: center; }
.home-lightbox__close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
}
.home-lightbox__thumbs {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding-top: 0.8rem;
  overflow-x: auto;
}
.home-lightbox__thumbs button {
  flex: 0 0 auto;
  height: 3.2rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.25rem;
  background: none;
  opacity: 0.55;
  cursor: pointer;
}
.home-lightbox__thumbs button[aria-current="true"] {
  border-color: #fff;
  opacity: 1;
}
.home-lightbox__thumbs img {
  display: block;
  height: 100%;
  width: auto;
  border-radius: 0.15rem;
}
@media screen and (max-width: 44em) {
  .home-lightbox {
    grid-template-columns: 2.6rem 1fr 2.6rem;
  }
  .home-lightbox__thumbs {
    justify-content: flex-start;
  }
}
