/* RushLifeRP Doc Hub — Gesetze & IC-Regelwerk v5 */

.doc-hub {
  min-height: 100vh;
  padding-bottom: 64px;
}

.doc-hub-hero {
  padding: 108px 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.doc-hub-hero .container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.doc-hub-hero h1 {
  margin: 6px 0 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.doc-hub-hero .eyebrow {
  margin: 0;
}

.doc-hub-hero__lead {
  margin: 10px 0 0;
  max-width: 520px;
  color: #9aa6b8;
  font-size: 0.95rem;
  line-height: 1.6;
}

.doc-hub-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-hub-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #c6cedd;
  font-size: 0.8rem;
  font-weight: 800;
}

.doc-hub-chip strong {
  color: #fff;
  font-weight: 950;
}

body[data-page="laws"] .doc-hub-chip strong {
  color: #ff9a9a;
}

body[data-page="rules"] .doc-hub-chip strong {
  color: var(--accent);
}

.doc-hub-body {
  padding-top: 22px;
}

.doc-hub-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.doc-search-wrap {
  flex: 1 1 280px;
  position: relative;
}

.doc-search {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.doc-search::placeholder {
  color: #6b7a8e;
}

.doc-search:focus {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

body[data-page="laws"] .doc-search:focus {
  border-color: rgba(255, 88, 88, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 88, 88, 0.12);
}

.doc-search-wrap::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  opacity: 0.45;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23fff' stroke-width='2' d='M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm10 2-4.35-4.35'/%3E%3C/svg%3E") center/contain no-repeat;
  pointer-events: none;
}

.doc-search-count {
  font-size: 0.78rem;
  color: #6b7a8e;
  font-weight: 800;
  white-space: nowrap;
}

.doc-search-count.is-hidden {
  display: none;
}

.doc-hub-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.doc-hub-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #8f99ac;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.doc-hub-tab span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.72rem;
  font-weight: 950;
}

.doc-hub-tab:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

.doc-hub-tab.is-active {
  color: #fff;
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.1);
}

body[data-page="laws"] .doc-hub-tab.is-active {
  border-color: rgba(255, 88, 88, 0.35);
  background: rgba(255, 88, 88, 0.1);
}

body[data-page="laws"] .doc-hub-tab.is-active span {
  color: #ff8a8a;
}

body[data-page="rules"] .doc-hub-tab.is-active span {
  color: var(--accent);
}

.doc-hub-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.doc-hub-aside {
  position: sticky;
  top: 96px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(10, 11, 14, 0.9);
  backdrop-filter: blur(14px);
}

.doc-hub-aside__label {
  display: block;
  margin-bottom: 10px;
  color: #6b7a8e;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.doc-hub-aside nav {
  display: grid;
  gap: 4px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.doc-hub-aside nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.doc-hub-aside a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: #8f99ac;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  transition: background 0.12s, color 0.12s;
}

.doc-hub-aside a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.doc-hub-aside a.is-active {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.2);
  color: #fff;
}

.doc-hub-aside a.is-hidden {
  display: none;
}

body[data-page="laws"] .doc-hub-aside a.is-active {
  background: rgba(255, 88, 88, 0.09);
  border-color: rgba(255, 88, 88, 0.22);
}

.doc-hub-panels {
  min-width: 0;
}

.doc-panel {
  display: none;
  animation: docPanelIn 0.2s ease;
}

.doc-panel.is-active {
  display: block;
}

@keyframes docPanelIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.doc-panel__header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
}

.doc-panel__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(168, 85, 247, 0.12);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 950;
  flex-shrink: 0;
}

body[data-page="laws"] .doc-panel__num {
  background: rgba(255, 88, 88, 0.14);
  color: #ff8a8a;
}

.doc-panel__header h2 {
  margin: 0;
  color: #fff;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.doc-panel__header p {
  margin: 4px 0 0;
  color: #8f99ac;
  font-size: 0.88rem;
  line-height: 1.45;
}

.doc-panel__body {
  display: grid;
  gap: 12px;
}

/* Quick reference (rules) */
.doc-quickref {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.doc-quickref button {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #aab3c5;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.doc-quickref button:hover,
.doc-quickref button.is-active {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
  color: #fff;
}

/* Rule rows */
.rule-rows {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  transition: background 0.12s, border-color 0.12s;
}

.rule-row:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.12);
}

.rule-row.is-hidden {
  display: none;
}

.rule-row__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(168, 85, 247, 0.1);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1.2;
}

.rule-row__text {
  display: block;
  min-width: 0;
  width: auto;
  height: auto;
  color: #dde4f0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.rule-row__text strong {
  color: #fff;
}

.doc-hub .rule-row__num {
  display: inline-flex;
  width: auto;
  height: auto;
}

.rule-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

.rule-badge--perm {
  background: rgba(255, 77, 104, 0.18);
  border: 1px solid rgba(255, 77, 104, 0.35);
  color: #ff8a9e;
}

.rule-badge--ban {
  background: rgba(255, 179, 71, 0.16);
  border: 1px solid rgba(255, 179, 71, 0.32);
  color: #ffc978;
}

.rule-badge--strict {
  background: rgba(255, 88, 88, 0.14);
  border: 1px solid rgba(255, 88, 88, 0.3);
  color: #ff9a9a;
}

.rule-badge--info {
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.32);
  color: #c4b5fd;
}

.rule-group-label {
  grid-column: 1 / -1;
  margin: 8px 0 2px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(168, 85, 247, 0.07);
  border-left: 3px solid var(--accent);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rule-group-label.is-hidden {
  display: none;
}

/* Law blocks */
.law-block {
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid rgba(255, 88, 88, 0.35);
}

.law-block.is-hidden {
  display: none;
}

.law-block__title {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #f0f4ff;
  font-size: 0.98rem;
  font-weight: 950;
}

.law-block p {
  margin: 0 0 8px;
  color: #b8c2d4;
  font-size: 0.88rem;
  line-height: 1.65;
}

.law-block p:last-child {
  margin-bottom: 0;
}

.law-block .rule-list {
  margin-top: 8px;
}

.law-block .rule-list li {
  padding: 10px 12px;
  border-radius: 10px;
}

.law-block--muted {
  opacity: 0.5;
  border-left-color: rgba(255, 255, 255, 0.15);
}

.penalty-table-group.is-hidden {
  display: none;
}

/* Strafkatalog sub-tabs */
.straf-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.straf-tab {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: transparent;
  color: #8f99ac;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.straf-tab.is-active {
  color: #fff;
  border-color: rgba(255, 88, 88, 0.35);
  background: rgba(255, 88, 88, 0.1);
}

.straf-view {
  display: none;
}

.straf-view.is-active {
  display: block;
}

/* Badge legend */
.doc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.78rem;
  color: #8f99ac;
}

.doc-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.doc-empty {
  padding: 32px;
  text-align: center;
  color: #6b7a8e;
  font-size: 0.9rem;
}

.doc-hub-linkbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.doc-hub-linkbar .button {
  font-size: 0.85rem;
}

@media (max-width: 960px) {
  .doc-hub-layout {
    grid-template-columns: 1fr;
  }

  .doc-hub-aside {
    position: static;
    max-height: none;
  }

  .doc-hub-aside nav {
    max-height: 200px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .doc-hub-hero {
    padding-top: 96px;
  }

  .doc-hub-aside nav {
    grid-template-columns: 1fr;
  }

  .rule-row {
    grid-template-columns: 1fr;
  }

  .rule-row__num {
    width: fit-content;
  }
}
