:root {
  /* Legacy NanoGuide brand */
  --md-primary-fg-color: #231c3a;
  --md-primary-fg-color--light: #2f2750;
  --md-primary-fg-color--dark: #1a152c;
  --md-accent-fg-color: #00afeb;
  --md-accent-fg-color--transparent: rgba(0, 175, 235, 0.12);

  /* No external fonts: keep it system-only */
  --md-text-font: "Verdana", Arial, sans-serif;
  --md-code-font: "Consolas", "Courier New", monospace;
}

/* Page framing similar to legacy Zendesk */
body {
  background-color: #f8f9f9;
}

/* Header + tabs: cleaner, flatter like legacy */
.md-header,
.md-tabs {
  box-shadow: none;
}

.md-header {
  height: 76px;
  position: sticky;
  top: 0;
  z-index: 31;
}

.md-header__inner {
  min-height: 76px;
  gap: 1rem;
  padding-left: 2rem;
  padding-right: 2rem;
}

.md-header__button.md-logo img {
  height: 34px;
  width: auto;
}

.ng-header-session-badge {
  position: relative;
  margin-left: auto;
}

.ng-header-session-badge__toggle,
.ng-header-session-badge__logout {
  font: inherit;
}

.ng-header-session-badge__toggle {
  display: inline-flex;
  align-items: center;
  max-width: min(26rem, 42vw);
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.ng-header-session-badge__toggle:hover,
.ng-header-session-badge__toggle:focus {
  background: rgba(255, 255, 255, 0.14);
}

.ng-header-session-badge__label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ng-header-session-badge__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 20;
  min-width: 16rem;
  padding: 0.9rem;
  border: 1px solid #d8dcde;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}

.ng-header-session-badge__email {
  margin-bottom: 0.75rem;
  color: #1f2937;
  font-weight: 700;
  word-break: break-word;
}

.ng-header-session-badge__tags {
  margin-bottom: 0.75rem;
}

.ng-header-session-badge__tags-title {
  margin-bottom: 0.45rem;
  color: #4b5563;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ng-header-session-badge__tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ng-header-session-badge__tag {
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  color: #134e4a;
  background: #ecfeff;
  border: 1px solid #99f6e4;
  font-size: 0.8rem;
  line-height: 1.2;
}

.ng-header-session-badge__logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  color: #1f2937;
  background: #f3f4f6;
  cursor: pointer;
}

.ng-header-session-badge__logout:hover,
.ng-header-session-badge__logout:focus {
  background: #e5e7eb;
}

@media screen and (max-width: 59.9844em) {
  .ng-header-session-badge {
    display: none;
  }
}

@media screen and (min-width: 60em) {
  .md-header__title {
    display: none;
  }
}

.md-tabs {
  background-color: #231c3a;
}

.md-tabs__list {
  padding-left: 2rem;
  padding-right: 2rem;
}

@media screen and (min-width: 60em) {
  .md-tabs {
    position: sticky !important;
    top: 76px !important;
    z-index: 30;
    transform: none !important;
  }
}

.md-tabs__link {
  color: rgba(255, 255, 255, 0.82);
}

.md-tabs__link--active,
.md-tabs__link:focus,
.md-tabs__link:hover {
  color: #fff;
}

@media screen and (min-width: 76.25em) {
  .md-grid {
    max-width: 1440px;
  }
}

.md-main__inner {
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}

/* Typography */
.md-typeset {
  font-size: 15px;
  line-height: 1.55;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  color: #454444;
  font-weight: 400;
}

/* Links: match legacy underline-on-hover */
.md-typeset a {
  color: #00afeb;
  text-decoration: none;
}

.md-typeset a:hover,
.md-typeset a:focus {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Nav accents */
.md-nav__link--active,
.md-nav__link:focus,
.md-nav__link:hover {
  color: #00afeb;
}

/* Content surface (light border like Zendesk "container") */
.md-content {
  background: #fff;
  border: 1px solid #d8dcde;
  border-radius: 4px;
}

.md-content__inner {
  padding: 20px;
}

@media screen and (max-width: 76.1875em) {
  .md-content__inner {
    padding: 16px;
  }
}

/* Embedded media */
.md-typeset iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
  aspect-ratio: 16 / 9;
}

.md-typeset img {
  max-height: 350px;
  width: auto;
}

/* Admonitions: keep font size consistent with body text */
.md-typeset .admonition,
.md-typeset details {
  font-size: 15px;
}

.md-typeset .admonition-title,
.md-typeset summary {
  font-size: 15px;
}

.md-typeset .admonition,
.md-typeset details {
  border-color: #d8dcde;
  background-color: #f8f9f9;
}

.md-typeset .admonition-title {
  background-color: #e9ebed;
}

/* Keyboard keys (pymdownx.keys) */
.md-typeset kbd {
  display: inline-block;
  padding: 0.15em 0.4em;
  font-family: var(--md-code-font);
  font-size: 0.85em;
  line-height: 1.4;
  color: #454444;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 3px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12), 0 2px 0 0 rgba(255, 255, 255, 0.7) inset;
}

/* Separator between keys */
.md-typeset .keys > span {
  padding: 0 0.1em;
  color: #666;
}

/* Layout: Splits image and text horizontally */

.md-typeset .split_grid {
  display: grid;
  grid-template-columns: 50% 50%;
  align-items: start;
  gap: 0.5rem;
}

.md-typeset .split_grid > div > * {
  margin: 0;
}

.md-typeset .split_grid img, 
.md-typeset .split_grid video{
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
}

.md-typeset .split_grid video {
  margin-top: 1em; /* align videos with images (img are by default wrapped inside <p> </p> which have 1em margin) */
}

@media screen and (max-width: 76.1875em) {
  .md-typeset .split_grid {
    grid-template-columns: 1fr;
  }
}

/* Style: Table header have a colored background */

.md-typeset table thead th {
  background-color: var(--md-accent-fg-color);
  color: #ffffff;
}

.md-typeset table thead th a,
.md-typeset table thead th a:hover,
.md-typeset table thead th a:focus {
  color: inherit;
}

/* Style: Series buttons for different products. For embedding links to coressponding article */

.series {
  position: relative;
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-left: 0.25em;
  vertical-align: text-bottom;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.series-pp {
  background-image: url("../assets/favicons/pp_series_icon.png");
}

.series-qx {
  background-image: url("../assets/favicons/qx_series_icon.png");
}

/* Additional hovering of text improves UX */
.series::after {
  position: absolute;
  bottom: -220%;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 6px;
  font-size: 0.5rem;
  white-space: nowrap;
  background: #333;
  color: #fff;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.series:hover::after {
  opacity: 1;
}

.series-pp::after {
  content: "Photonic Professional";
}

.series-qx::after {
  content: "Quantum X";
}

/* GWL code */
.md-typeset .language-gwl,
.md-typeset pre code.language-gwl,
.md-typeset .highlight code.language-gwl,
.md-typeset .highlight .language-gwl {
  display: block;
  text-align: left;
}

.md-typeset .language-gwl .mi,
.md-typeset .language-gwl .mf,
.md-typeset .highlight code.language-gwl .mi,
.md-typeset .highlight code.language-gwl .mf,
.md-typeset .highlight .language-gwl .mi,
.md-typeset .highlight .language-gwl .mf {
  color: #000000;
}

.md-typeset .language-gwl .nx,
.md-typeset .highlight code.language-gwl .nx,
.md-typeset .highlight .language-gwl .nx {
  color: #008000;
}

.md-typeset .language-gwl .kn,
.md-typeset .highlight code.language-gwl .kn,
.md-typeset .highlight .language-gwl .kn,
.md-typeset .language-gwl .kn + .w + .nx,
.md-typeset .language-gwl .kn + .w + .nx + .err,
.md-typeset .language-gwl .kn + .w + .nx + .err + .nx,
.md-typeset .language-gwl .kn + .w + .nx + .err + .nx + .err,
.md-typeset .language-gwl .kn + .w + .nx + .err + .nx + .err + .nx,
.md-typeset .highlight code.language-gwl .kn + .w + .nx,
.md-typeset .highlight code.language-gwl .kn + .w + .nx + .err,
.md-typeset .highlight code.language-gwl .kn + .w + .nx + .err + .nx,
.md-typeset .highlight code.language-gwl .kn + .w + .nx + .err + .nx + .err,
.md-typeset .highlight code.language-gwl .kn + .w + .nx + .err + .nx + .err + .nx,
.md-typeset .highlight .language-gwl .kn + .w + .nx,
.md-typeset .highlight .language-gwl .kn + .w + .nx + .err,
.md-typeset .highlight .language-gwl .kn + .w + .nx + .err + .nx,
.md-typeset .highlight .language-gwl .kn + .w + .nx + .err + .nx + .err,
.md-typeset .highlight .language-gwl .kn + .w + .nx + .err + .nx + .err + .nx,
.md-typeset .language-gwl .err,
.md-typeset .highlight code.language-gwl .err,
.md-typeset .highlight .language-gwl .err {
  color: #0066cc;
}
/* Transcript box */
.transcript {
  margin-top: 0.75rem;
}

.transcript summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* scrollable area */
.transcript__content {
  max-height: 220px;
  overflow-y: auto;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
  background: var(--md-default-bg-color);
}

/* optional: smoother scroll */
.transcript__content {
  scroll-behavior: smooth;
}
