/*
 * Wissensbank glossary (inc/glossary.php): the term links inside articles,
 * their tooltip, the A-Z page and the term pages. Loaded after home.css and
 * uses its tokens.
 */

/* A glossary link reads as body copy with a dotted green underline and a
   small book glyph, so it is not mistaken for a link that leaves the article.
   The doubled class outranks home.css' solid-underline prose link rule
   (.article__text p a:not(.wb-products *), specificity 0,2,2). */
.article__text a.gl-link.gl-link,
.gl-link {
  color: inherit;
  text-decoration: underline dotted var(--green);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
  /* keep the book glyph on the word's line; terms are one or two words */
  white-space: nowrap;
}
.article__text a.gl-link.gl-link:hover,
.gl-link:hover { color: var(--blue); text-decoration-style: solid; }
.gl-link::after {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-left: 0.15em;
  vertical-align: 0.35em;
  background: var(--green);
  -webkit-mask: url("assets/icon-glossary.svg") center / contain no-repeat;
  mask: url("assets/icon-glossary.svg") center / contain no-repeat;
}

.gl-tip {
  position: absolute;
  z-index: 60;
  max-width: 320px;
  padding: 14px 16px;
  border: 1px solid var(--light-blue);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(41, 38, 93, 0.14);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 22px;
  color: var(--dark-grey);
}
.gl-tip[hidden] { display: none; }
.gl-tip__term { display: block; margin-bottom: 4px; font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--blue); }
.gl-tip__more { display: inline-block; margin-top: 8px; font-weight: 600; color: var(--green); }
.gl-tip__more:hover { color: #00b895; }

.gl-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--light-blue);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0.2px;
  color: var(--blue);
  white-space: nowrap;
  vertical-align: middle;
}

/* A-Z page */
.gl { max-width: 960px; margin: 48px auto 96px; padding: 0 var(--page-margin); box-sizing: content-box; }
.gl__head { display: flex; flex-direction: column; gap: 16px; }
.gl__title { font-family: var(--font-display); font-size: 48px; line-height: 1.15; letter-spacing: -1.6px; color: var(--blue); text-wrap: balance; }
.gl__lead { font-size: 18px; line-height: 26px; color: var(--dark-grey); }
.gl__legend { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--grey); }
.gl__filter input {
  width: 100%;
  max-width: 420px;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--light-blue);
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
}
.gl__filter input:focus { outline: 2px solid var(--green); outline-offset: 0; }

.gl-letters {
  position: sticky;
  top: var(--sticky-top, 0px);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 32px 0 8px;
  padding: 10px 0;
  background: #fff;
  border-bottom: 1px solid var(--light-blue);
}
.gl-letters a,
.gl-letters span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15px;
}
.gl-letters a { color: var(--blue); background: var(--light-blue); }
.gl-letters a:hover { background: var(--green); color: #fff; }
.gl-letters span { color: var(--light-grey); }

.gl-group { scroll-margin-top: 140px; }
.gl-group__letter { margin: 40px 0 8px; font-family: var(--font-display); font-size: 36px; color: var(--green); }
.gl-entry { padding: 20px 0; border-bottom: 1px solid var(--divider); scroll-margin-top: 140px; }
.gl-entry:target { background: linear-gradient(90deg, rgba(0, 166, 135, 0.08), transparent 70%); }
.gl-entry__term { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 22px; line-height: 30px; color: var(--blue); }
.gl-entry__term a { color: var(--blue); text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: 4px; }
.gl-entry__term a:hover { color: var(--green); }
.gl-entry__alt { margin-top: 2px; font-size: 14px; color: var(--grey); }
.gl-entry__text { margin-top: 8px; font-size: 18px; line-height: 26px; color: var(--dark-grey); }
.gl-entry__text p + p { margin-top: 10px; }
.gl-entry__text a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.gl-entry__more { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 15px; font-weight: 600; }
.gl-entry__more a { color: var(--green); }
.gl-entry__more a::after { content: " \2192"; }
.gl-entry__more a:hover { color: #00b895; }
.gl__empty { padding: 24px 0; font-size: 17px; }

/* while searching (glossary.js): one flat column ordered by rank, the letter
   groups dissolve into it and their letters hide */
.gl__list.is-searching { display: flex; flex-direction: column; }
.gl__list.is-searching .gl-group { display: contents; }
.gl__list.is-searching .gl-group__letter { display: none; }
.gl__list.is-searching .gl__empty { order: 4; }
.gl__mentions {
  margin: 28px 0 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--grey);
}
.gl__empty a { color: var(--green); text-decoration: underline; }

/* term page */
.gl-term__short p:not(.wb-facts__label) { font-size: 17px; line-height: 26px; }
.gl-faq { display: flex; flex-direction: column; }
.gl-faq__item { border-bottom: 1px solid var(--divider); padding: 14px 0; }
.gl-faq__item summary { cursor: pointer; font-size: 18px; font-weight: 600; line-height: 26px; color: var(--blue); }
.gl-faq__item p { margin-top: 8px; }
.gl-term__back a { font-weight: 600; }

@media (max-width: 900px) {
  .gl { margin: 16px auto 64px; }
  .gl__title { font-size: 30px; line-height: 1.2; letter-spacing: -0.8px; }
  .gl-letters { margin-top: 20px; gap: 2px; }
  .gl-letters a, .gl-letters span { width: 28px; height: 28px; font-size: 14px; }
  .gl-letters span { display: none; }
  .gl-group, .gl-entry { scroll-margin-top: 70px; }
  .gl-group__letter { margin-top: 28px; font-size: 30px; }
  .gl-entry__term { font-size: 19px; line-height: 26px; }
  .gl-tip { display: none; }
}

/* the "Glossar A-Z" chip at the end of the Wissensbank topic row */
.wb-chip--glossary { display: inline-flex; align-items: center; gap: 6px; }
.wb-chip--glossary::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("assets/icon-glossary.svg") center / contain no-repeat;
  mask: url("assets/icon-glossary.svg") center / contain no-repeat;
}
