* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #0f172a;
}

.topnav {
  position: static;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: #e7e7e7;
  color: #0f172a;
  border-bottom: 1px solid #0f172a;
}

body.timeline-view .topnav {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.topnav h1 {
  margin: 0;
  font-size: 1.2rem;
}

.topnav__menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.topnav__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topnav__controls label {
  font-size: 0.95rem;
  color: #0f172a;
}

.topnav__controls input,
.topnav__date-input {
  width: 10rem;
  height: 1.5rem;
  border-radius: 999px;
  background: rgb(255, 255, 255);
  accent-color: #ffffff;
  border: 1px solid #0f172a;
  color: #0f172a;
  padding: 0 0.5rem;
}

.topnav__controls input:focus,
.topnav__date-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.topnav__controls span {
  min-width: 3rem;
  font-weight: 700;
  text-align: right;
  color: #0f172a;
}

.topnav__date-display {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-weight: 600;
  color: #0f172a;
  font-size: 0.95rem;
}

.timeline-filters {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1100;
  display: grid;
  gap: 1rem;
  padding: 1rem;
  max-height: 72vh;
  overflow: visible;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 18px 500px rgba(15, 23, 42, 0.8);
}

/* @media (max-width: 768px) {
  .timeline-filters {
    top: 4rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }
} */

.timeline-filter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 180px;
  width: 400px;
}

.timeline-filter--grow {
  flex: 1;
  min-width: 260px;
}

.timeline-filter label {
  font-size: 0.85rem;
  color: #475569;
}

.timeline-filter select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
}

.timeline-filter select[multiple] {
  min-height: 11rem;
}

.filter-dropdown,
.visibility-dropdown {
  position: relative;
  /* z-index: 1000; */
}

.filter-dropdown__button,
.visibility-dropdown__button {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.filter-dropdown__panel,
.visibility-dropdown__panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  z-index: 1001;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.12);
  max-height: 18rem;
  overflow-y: auto;
}

.filter-dropdown__panel.hidden,
.visibility-dropdown__panel.hidden {
  display: none;
}

.filter-dropdown__list,
.timeline-visibility-list {
  display: grid;
  gap: 0.35rem;
}

.filter-dropdown-item,
.timeline-visibility-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #0f172a;
}

.timeline-visibility-empty {
  color: #64748b;
  font-size: 0.95rem;
  padding: 0.5rem 0;
}

.visibility-dropdown__button {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.visibility-dropdown__panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.12);
  max-height: 18rem;
  overflow-y: auto;
}

.visibility-dropdown__panel.hidden {
  display: none;
}

.timeline-visibility-empty {
  color: #64748b;
  font-size: 0.95rem;
  padding: 0.5rem 0;
}

.timeline-visibility-list {
  display: grid;
  gap: 0.35rem;
  max-height: 14rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.timeline-visibility-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #0f172a;
}

.timeline-visibility-item input {
  accent-color: #2563eb;
}

.topnav__link {
  border: 1px solid #0f172a;
  background: transparent;
  color: #0f172a;
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.topnav__link:hover,
.topnav__link.active {
  background: #ffffff;
  color: #0f172a;
  border-color: #0f172a;
}

.zeitstrahl {
  display: flex;
  overflow: hidden;
  width: 100%;
}

.vorspalte {
  display: flex;
  flex-direction: column;
  /* gap: 0.5rem; */
  width: 200px;
  padding-top: 4.7rem;
  overflow-y: hidden;
}

.hauptspalte {
  position: relative;
  display: flex;
  flex-direction: column;
  /* gap: 0.5rem; */
  overflow-x: auto;
  overflow-y: auto;
  padding-bottom: 10px;
  width: 100%;
  min-width: 0;
  flex: 1;
}

.timeline-header {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem 1rem 0.5rem 0;
  background: #ffffff;
  min-width: 100%;
  border-bottom: 1px solid #e2e8f0;
  z-index: 950;
  flex-shrink: 0;
}

.timeline-current-row {
  position: relative;
  min-height: 1.75rem;
}

.timeline-current-date {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.08);
}

.timeline-years {
  position: relative;
  width: 100%;
  min-height: 1.25rem;
}

.timeline-year {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 0.85rem;
  color: #475569;
  white-space: nowrap;
}

.timeline-year::before {
  content: "";
  position: absolute;
  top: 1.25rem;
  left: 50%;
  width: 1px;
  height: 0.75rem;
  background: #cbd5e1;
}

.zeitLinie {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(220, 38, 38, 0.95);
  z-index: 40;
  pointer-events: none;
  box-shadow: 0 0 6px rgba(220, 38, 38, 0.6);
}

.zeileVorspalte {
  display: flex;
  align-items: center;
  height: 110px;
  padding: 5px;
  overflow: hidden;
}

.zeileHauptspalte {
  position: relative;
  height: 110px;
  width: max-content;
  min-width: 100%;
}

.version {
  position: absolute;
  top: 10px;
  height: 90px;
  background: #2563eb;
  border-radius: 0.5rem;
  color: #000000;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.version__text {
  position: relative;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateX(0);
}

.version__text > div {
  width: 100%;
  text-align: left;
}

.version:hover {
  transform: translateY(-1px);
}

.content-section {
  background: #ffffff;
  /* border-radius: 1rem; */
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
  /* padding: 0.25rem 0.25rem;# */
}

.hidden {
  display: none !important;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.event {
  padding: 1rem;
  border-left: 4px solid #2563eb;
  background: #f8fafc;
  border-radius: 0.75rem;
}

.verordnungsliste {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
  padding: 1rem;
}

.verordnungsliste__sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e2e8f0;
  padding-right: 1rem;
  max-height: 88vh;
}

.verordnungsliste__meta-sidebar {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
}

.verordnungsliste__version-select-sidebar {
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #ffffff;
}

.verordnungsliste__version-select-sidebar label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: #0f172a;
}

.verordnungsliste__items {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  /* max-height: 58%; */
  overflow-y: auto;
}

.verordnungsliste__item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.verordnungsliste__item:hover,
.verordnungsliste__item--active {
  background: #ffffff;
  border-color: #2563eb;
}

.verordnungsliste__item-title {
  font-weight: 700;
  margin: 0;
}

.verordnungsliste__item-subtitle {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
}

.verordnungsliste__detail {
  min-height: 320px;
  width: 100%;
  max-width: 100%;
}

.verordnungsliste__content {
  /* padding: 1rem; */
  /* border-radius: 0.75rem; */
  background: #ffffff;
  /* border: 1px solid #e2e8f0; */
}

.verordnungsliste__version-select {
  margin-bottom: 1rem;
}

.verordnungsliste__version-select label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: #0f172a;
}

.verordnungsliste__version-dropdown {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.95rem;
}

.verordnungsliste__version-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.verordnungsliste__version-button {
  border: 1px solid #d1d5db;
  background: #f8fafc;
  color: #0f172a;
  padding: 0.55rem 0.9rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.verordnungsliste__version-button:hover,
.verordnungsliste__version-button--active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.verordnungsliste__version-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.verordnungsliste__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
  align-items: start;
}

.verordnungsliste__content-wrapper,
.verordnungsliste__toc {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 0.75rem;
  /* height: 80vh; */
  max-height: 88vh;
  overflow: auto;
  padding: 0px 10px;
}

.verordnungsliste__content-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
}

.verordnungsliste__fullscreen-toggle {
  position: sticky;
  align-self: flex-end;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  width: 2.6rem;
  min-height: 2.6rem;
  margin-bottom: -2.6rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  font-size: 1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

body.fullscreen-text-only .topnav,
body.fullscreen-text-only .timeline-filters,
body.fullscreen-text-only .verordnungsliste__sidebar,
body.fullscreen-text-only .verordnungsliste__toc {
  display: none !important;
}

body.fullscreen-text-only .verordnungsliste__content {
  padding: 0;
  border: none;
  box-shadow: none;
}

body.fullscreen-text-only .verordnungsliste__content-wrapper {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  max-height: none;
  border-radius: 0;
  padding: 1.5rem 2rem;
  background: #ffffff;
  z-index: 2000;
  overflow: auto;
}

body.fullscreen-text-only .verordnungsliste__markdown {
  padding-top: 0.5rem;
}

.verordnungsliste__toc {
  position: sticky;
  top: 1rem;
  padding: 0;
}

.verordnungsliste__toc-header {
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
  padding: 1rem 1rem 0.75rem;
  margin: 0;
  border-bottom: 1px solid #e2e8f0;
}

.verordnungsliste__toc-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
}

.verordnungsliste__toc-search {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  background: #f8fafc;
  color: #0f172a;
}

.verordnungsliste__toc-search:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.verordnungsliste__toc-content {
  padding: 0 1rem 1rem;
}

.verordnungsliste__toc-content p,
.verordnungsliste__toc-content ul,
.verordnungsliste__toc-content ol {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.verordnungsliste__toc-content ul {
  list-style: none;
  padding-left: 0;
}

.verordnungsliste__toc-content li {
  margin: 0.35rem 0;
}

.verordnungsliste__toc-content a {
  display: inline-block;
  color: #1d4ed8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.verordnungsliste__toc-content a:hover {
  color: #2563eb;
  text-decoration: underline;
}

.verordnungsliste__empty {
  margin: 0;
  color: #475569;
}

.verordnungsliste__meta {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.verordnungsliste__meta-item {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  overflow: hidden;
}

.verordnungsliste__meta-item strong {
  width: 140px;
  color: #0f172a;
}

.verordnungsliste__content h1,
.verordnungsliste__content h2,
.verordnungsliste__content h3,
.verordnungsliste__content h4,
.verordnungsliste__content h5,
.verordnungsliste__content h6 {
  margin-top: 1rem;
}

.verordnungsliste__content p,
.verordnungsliste__content ul,
.verordnungsliste__content ol {
  margin: 0.75rem 0;
  line-height: 1.7;
}

.verordnungsliste__content a {
  color: #2563eb;
}

.verordnungsliste__markdown {
  margin: 0;
}

.verordnungsliste__markdown h1,
.verordnungsliste__markdown h2,
.verordnungsliste__markdown h3,
.verordnungsliste__markdown h4,
.verordnungsliste__markdown h5,
.verordnungsliste__markdown h6 {
  margin-top: 1.5rem;
  scroll-margin-top: 1rem;
}

.verordnungsliste__markdown p,
.verordnungsliste__markdown ul,
.verordnungsliste__markdown ol {
  margin: 0.75rem 0;
  /* line-height: 1.7; */
}

.verordnungsliste__markdown a {
  color: #2563eb;
}

.verordnungsliste__markdown table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border: 1px solid black;
}

.verordnungsliste__markdown th {
  border: 1px solid black;
  padding: 8px;
  text-align: left;
  hyphens: auto;
  word-break: break-word;
  font-weight: bold;
}

.verordnungsliste__markdown td {
  border: 1px solid black;
  padding: 8px;
  text-align: left;
  hyphens: auto;
  word-break: break-word;
  font-weight: normal;
}

@media (max-width: 900px) {
  .verordnungsliste {
    grid-template-columns: 1fr;
  }

  .verordnungsliste__sidebar {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
  }

  .verordnungsliste__body {
    grid-template-columns: 1fr;
  }

  .verordnungsliste__toc {
    position: static;
    order: -1;
    margin-bottom: 1rem;
  }

  .verordnungsliste__content-wrapper {
    max-height: 95vh;
  }
}

.date {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.banner__overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: #00000080;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.banner__inhalt {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 0.75rem;
  box-shadow: 0 4px 15px #00000033;
  text-align: center;
  max-width: 600px;
  width: 90%;
  position: relative;
}

.close__btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 15px;
  transition: background 0.2s;
}

.close__btn:hover {
  background-color: #0056b3;
}
