/* CyRO Wiki — Ragnarok-themed styling */

/* Full-page background image (Ragnarok art, 5% opacity) */
body {
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("../assets/images/background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.05;
  z-index: -1;
  pointer-events: none;
}

/* Header: Ragnarok-themed background image at 10% opacity */
.md-header {
  position: relative;
  background-color: rgba(55, 71, 79, 0.98) !important; /* slate base so image blends nicely */
}

.md-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("../assets/images/background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
}

.md-header__inner,
.md-header__title,
.md-header__button {
  position: relative;
  z-index: 1;
}

/* Tabs / menu bar: same dark style as header (no bright yellow or purple) */
.md-tabs {
  position: relative;
  background-color: rgba(55, 71, 79, 0.98) !important;
}

.md-tabs::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("../assets/images/background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
}

.md-tabs__inner,
.md-tabs__link {
  position: relative;
  z-index: 1;
}

/* Logo size in header */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 2.5rem;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

/* Slightly larger logo on desktop */
@media (min-width: 76.25em) {
  .md-header__button.md-logo img,
  .md-header__button.md-logo svg {
    height: 2.8rem;
    max-width: 200px;
  }
}

/* Accent links and buttons to match theme */
.md-typeset a {
  font-weight: 500;
}

/* Table headers — fantasy feel */
.md-typeset table:not([class]) th {
  background-color: rgba(255, 193, 7, 0.12);
  font-weight: 600;
}

/* Admonition / tip blocks */
.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-left-color: rgb(255, 193, 7);
}

.md-typeset .tip > .admonition-title,
.md-typeset .tip > summary {
  background-color: rgba(255, 193, 7, 0.1);
}

/* Side panel nav: smaller icons for sharper, high-quality look (pixel art friendly) */
.md-nav__icon-img {
  width: 1.125rem;
  height: 1.125rem;
  min-width: 1.125rem;
  min-height: 1.125rem;
  object-fit: contain;
  flex-shrink: 0;
  image-rendering: -moz-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.md-nav__link .md-nav__icon-img {
  margin-right: 0.35rem;
}

/* Images: always block so they don't sit on same line as caption */
.md-typeset img,
.md-typeset .md-typeset__img img,
.md-typeset p img {
  display: block !important;
  margin-bottom: 0.5rem;
}

/* Caption (italic line after image): own line below image, not beside it */
.md-typeset p em,
.md-typeset .md-typeset__img + p {
  display: block !important;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
  font-style: italic;
  clear: both;
}

/* Figure captions: prevent truncation, proper line height */
.md-typeset figure figcaption,
.md-typeset .md-typeset figure .md-typeset-caption {
  display: block !important;
  max-width: 100%;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  line-height: 1.5;
  margin-top: 0.35em;
  margin-bottom: 1rem;
  clear: both;
}

/* Ensure nav and content text isn't clipped (descenders, orientation) */
.md-nav__link .md-ellipsis,
.md-typeset figcaption {
  overflow: visible;
  text-overflow: unset;
}

/* Hide "Made with Material for MkDocs" footer */
.md-footer-meta__generator,
.md-footer-meta a[href*="squidfunk"] {
  display: none !important;
}
