/* Lexikon v2 */
#wrapper-db {
  background-image: url(../../../layout/d2r-logo-skull2560-2.webp), url(../../../layout/bg-middle-2560.webp);
  background-repeat: no-repeat, repeat-y;
  background-position: center top, center top;
  background-color: #111;
}

.lexikon {
  color: #d5cbb1;
}

.lexikon .intro {
  margin: 0 auto 2rem auto;
  max-width: 1100px;
  color: #b8b5ab;
  line-height: 1.45;
}

.lexikon .intro p {
  margin: 0.4rem 0;
}

.lex-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0 auto 1rem auto;
  max-width: 1100px;
}

.lex-search {
  flex: 1 1 360px;
  min-width: 240px;
  border: 1px solid #b28c3f;
  border-radius: 5px;
  padding: 0.6rem 0.8rem;
  background: #f6eed8;
  color: #1f1709;
  font-weight: 600;
}

.lex-search::placeholder {
  color: #5f4f30;
  opacity: 1;
}

.lex-search:focus {
  outline: 2px solid #ef3207;
  outline-offset: 0;
}

.lex-btn {
  border: 1px solid #b28c3f;
  border-radius: 5px;
  padding: 0.55rem 0.8rem;
  background-image: none;
  background-color: #e2b252;
  color: #241603;
  font-weight: 700;
  cursor: pointer;
}

.lex-btn:hover,
.lex-btn:focus {
  border-color: #f4be41;
  background-color: #f4be41;
  color: #1c1102;
}

.lex-count {
  margin-left: auto;
  color: #a9a7a6;
  font-size: 0.95rem;
}

.lex-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 auto 1rem auto;
  max-width: 1100px;
}

.lex-filter {
  border: 1px solid #b28c3f;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  background: #f6eed8;
  color: #2a1c08;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.lex-filter:hover,
.lex-filter:focus {
  border-color: #ef3207;
  color: #1c1102;
}

.lex-filter.is-active {
  border-color: #ef3207;
  background: #ef3207;
  color: #fff3d6;
}

.lex-filter.is-hidden {
  display: none;
}

.lex-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 auto 1rem auto;
  max-width: 1100px;
}

.lex-links a {
  display: inline-block;
  min-width: 2rem;
  text-align: center;
  border: 1px solid #6b8996;
  border-radius: 5px;
  padding: 0.2rem 0.45rem;
  font-family: "Old Fenris", serif;
  font-size: 1.55rem;
  color: #bfa668;
  text-decoration: none;
  background-image: url(../../../layout/pergament2-blau.webp);
  background-color: #06304f;
}

.lex-links a:hover,
.lex-links a:focus,
.lex-links a.active {
  color: #ef3207;
  border-color: #7a0000;
  background-image: url(../../../layout/pergament2-blau-heller.webp);
}

.lex-sections {
  margin: 0 auto;
  max-width: 1100px;
}

.lex-section {
  margin-bottom: 1.2rem;
}

.lex-section-head {
  position: relative;
  border: 1px solid #6b8996;
  border-radius: 5px;
  background-image: url(../../../layout/pergament2-blau.webp);
  background-color: #06304f;
  box-shadow: inset 0 -10px 30px 5px rgba(0, 0, 150, 0.1);
}

.lex-section-head h2 {
  margin: 0;
}

.lex-section-toggle {
  width: 100%;
  text-align: left;
  border: 0;
  padding: 0.9rem 2.7rem 0.9rem 1rem;
  background: transparent;
  color: #d5cbb1;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-headings, "Old Fenris", serif);
}

.lex-section-toggle::after {
  content: "\25b6";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9c0000;
  transition: transform 0.15s ease-out;
}

.lex-section-toggle[aria-expanded="true"]::after {
  transform: translateY(-50%) rotate(90deg);
  color: #ef3207;
}

.lex-section-top {
  position: absolute;
  right: 38px;
  top: 0.6rem;
  color: #d5cbb1;
  text-decoration: none;
  font-size: 1rem;
}

.lex-section-top:hover,
.lex-section-top:focus {
  color: #f4be41;
}

.lex-section-body {
  display: none;
  border: 1px solid #6b8996;
  border-top: 0;
  border-radius: 0 0 5px 5px;
  background-image: url(../../../layout/pergament2-blau.webp);
  background-color: #06304f;
  padding: 0.7rem;
}

.lex-section-body.open {
  display: block;
}

.lex-entry {
  margin: 0.45rem 0;
}

.lex-term {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid #8b0000;
  border-radius: 5px;
  background: #1f0000;
  color: #ddd9d1;
  font-weight: 600;
  padding: 0.55rem 2.5rem 0.55rem 0.7rem;
  position: relative;
  cursor: pointer;
}

.lex-term-label {
  min-width: 0;
}

.lex-entry-tags {
  display: inline-flex;
  gap: 0.3rem;
  margin-left: auto;
  margin-right: 0.2rem;
}

.lex-tag {
  border: 1px solid #6b8996;
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  background: #f6eed8;
  color: #2a1c08;
}

.lex-tag-d2 {
  border-color: #4f6d7a;
}

.lex-tag-d3 {
  border-color: #7b5a14;
}

.lex-tag-d4 {
  border-color: #8b2b1d;
}

.lex-term::after {
  content: "\25b6";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #9c0000;
  transition: transform 0.15s ease-out;
}

.lex-term[aria-expanded="true"] {
  border-color: #ef3207;
  color: #ef3207;
}

.lex-term[aria-expanded="true"]::after {
  transform: translateY(-50%) rotate(90deg);
  color: #ef3207;
}

.lex-definition {
  display: none;
  margin-top: 0.35rem;
  border: 1px solid #6b8996;
  border-radius: 5px;
  padding: 0.75rem;
  background-image: url(../../../layout/pergament2-blau.webp);
  background-color: #06304f;
  color: #d5cbb1;
  line-height: 1.45;
}

.lex-definition.open {
  display: block;
}

.lex-definition p {
  margin: 0 0 0.55rem 0;
}

.lex-definition p:last-child {
  margin-bottom: 0;
}

.lex-definition ul {
  margin: 0.35rem 0 0.55rem 1rem;
}

.lex-empty,
.lex-error {
  max-width: 1100px;
  margin: 0.9rem auto;
  border: 1px solid #6b8996;
  border-radius: 5px;
  padding: 0.75rem;
  background: rgba(20, 10, 8, 0.7);
}

.lex-error {
  border-color: #8b0000;
  color: #f0b7b0;
}

mark.lex-hl {
  background: #f4be41;
  color: #2a1803;
  padding: 0 0.08em;
  border-radius: 3px;
}

@media (max-width: 900px) {
  .lex-toolbar {
    align-items: stretch;
  }

  .lex-count {
    margin-left: 0;
    width: 100%;
  }

  .lex-links a {
    font-size: 1.2rem;
    min-width: 1.8rem;
  }
}
