/*
WolfPython Sidebar Fixed Sorted Restore V7
Stellt eine sichtbare, sortierte Sidebar wieder her.
Die Sidebar bleibt links fest fixiert. Der Seiteninhalt bekommt automatisch Abstand.
*/

:root {
  --wolf-v7-sidebar-width: 292px;
  --wolf-v7-accent: var(--wolf-user-accent, #465996);
  --wolf-v7-accent-2: var(--wolf-user-accent-2, #6d7fc7);
  --wolf-v7-rgb: var(--wolf-user-accent-rgb, 70,89,150);
  --wolf-v7-bg: rgba(8,10,23,.96);
  --wolf-v7-text: #ffffff;
  --wolf-v7-muted: rgba(255,255,255,.78);
  --wolf-v7-line: rgba(255,255,255,.14);
}

/* Sidebar wieder sichtbar und links fixiert */
body.wolf-v7-ready .wolf-v7-sidebar,
body.wolf-v7-ready .sidebar.wolf-v7-sidebar,
body.wolf-v7-ready .side.wolf-v7-sidebar,
body.wolf-v7-ready aside.wolf-v7-sidebar,
body.wolf-v7-ready nav.wolf-v7-sidebar {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: var(--wolf-v7-sidebar-width) !important;
  min-width: var(--wolf-v7-sidebar-width) !important;
  max-width: var(--wolf-v7-sidebar-width) !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  z-index: 9999 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
  background:
    radial-gradient(circle at 40% 0%, rgba(var(--wolf-v7-rgb), .28), transparent 34%),
    linear-gradient(180deg, rgba(8,10,23,.98), rgba(8,10,23,.94)) !important;
  border-right: 1px solid rgba(255,255,255,.12) !important;
  padding: 10px 10px 22px !important;
  box-sizing: border-box !important;
  color: #fff !important;
  box-shadow: 14px 0 40px rgba(0,0,0,.30) !important;
  scrollbar-width: thin;
}

/* Seiteninhalt bekommt links Platz, damit nichts überdeckt */
body.wolf-v7-ready {
  padding-left: var(--wolf-v7-sidebar-width) !important;
  box-sizing: border-box !important;
}

body.wolf-v7-ready main,
body.wolf-v7-ready .main,
body.wolf-v7-ready .content,
body.wolf-v7-ready .dashboard-content,
body.wolf-v7-ready .page-content,
body.wolf-v7-ready .app-content,
body.wolf-v7-ready .container,
body.wolf-v7-ready .container-fluid,
body.wolf-v7-ready #content,
body.wolf-v7-ready #main {
  margin-left: 0 !important;
  max-width: none !important;
  width: calc(100vw - var(--wolf-v7-sidebar-width) - 28px) !important;
  box-sizing: border-box !important;
}

/* Text immer weiß */
body.wolf-v7-ready .wolf-v7-sidebar *,
body.wolf-v7-ready .wolf-v7-sidebar a,
body.wolf-v7-ready .wolf-v7-sidebar a:link,
body.wolf-v7-ready .wolf-v7-sidebar a:visited,
body.wolf-v7-ready .wolf-v7-sidebar a:hover {
  color: #fff !important;
  text-decoration: none !important;
}

/* Aufbau */
.wolf-v7-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wolf-v7-brand {
  border-radius: 18px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(var(--wolf-v7-rgb), .36), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 10px 24px rgba(0,0,0,.20);
}

.wolf-v7-brand-title {
  font-size: 16px;
  font-weight: 950;
  line-height: 1.15;
}

.wolf-v7-brand-sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--wolf-v7-muted) !important;
  font-weight: 750;
}

.wolf-v7-cat {
  background: linear-gradient(135deg, rgba(var(--wolf-v7-rgb), .92), rgba(var(--wolf-v7-rgb), .62)) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  border-radius: 18px !important;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.14) !important;
}

.wolf-v7-cat summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  user-select: none;
}

.wolf-v7-cat summary::-webkit-details-marker {
  display: none;
}

.wolf-v7-cat summary::after {
  content: "⌄";
  font-size: 18px;
  color: rgba(255,255,255,.92);
  transition: transform .16s ease;
}

.wolf-v7-cat[open] summary::after {
  transform: rotate(180deg);
}

.wolf-v7-title {
  display: flex;
  gap: 9px;
  align-items: center;
  font-weight: 950;
  font-size: 15.5px;
  line-height: 1.15;
  text-shadow: 0 1px 2px rgba(0,0,0,.42);
}

.wolf-v7-sub {
  grid-column: 1 / 3;
  padding-left: 28px;
  margin-top: -4px;
  color: var(--wolf-v7-muted) !important;
  font-size: 11px;
  font-weight: 800;
}

.wolf-v7-links {
  display: grid;
  gap: 6px;
  padding: 0 10px 11px;
}

.wolf-v7-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.10);
  font-weight: 830;
  font-size: 13.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,.36);
}

.wolf-v7-links a:hover,
.wolf-v7-links a.wolf-v7-active {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.32);
}

/* Userbox */
.wolf-v7-user {
  border-radius: 18px;
  padding: 12px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.wolf-v7-user-title {
  font-weight: 950;
  font-size: 15px;
}

.wolf-v7-user-sub {
  color: var(--wolf-v7-muted) !important;
  font-size: 12px;
  margin-top: 3px;
  word-break: break-word;
}

.wolf-v7-actions {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.wolf-v7-actions a,
.wolf-v7-actions button {
  display: block;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
  font-weight: 850;
}

/* Hamburger für kleine Bildschirme */
.wolf-v7-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--wolf-v7-accent), var(--wolf-v7-accent-2));
  color: #fff;
  padding: 10px 12px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}

/* Mobile */
@media (max-width: 900px) {
  :root {
    --wolf-v7-sidebar-width: 286px;
  }

  body.wolf-v7-ready {
    padding-left: 0 !important;
  }

  body.wolf-v7-ready main,
  body.wolf-v7-ready .main,
  body.wolf-v7-ready .content,
  body.wolf-v7-ready .dashboard-content,
  body.wolf-v7-ready .page-content,
  body.wolf-v7-ready .app-content,
  body.wolf-v7-ready .container,
  body.wolf-v7-ready .container-fluid,
  body.wolf-v7-ready #content,
  body.wolf-v7-ready #main {
    width: 100% !important;
  }

  .wolf-v7-toggle {
    display: block;
  }

  body.wolf-v7-ready .wolf-v7-sidebar {
    transform: translateX(-100%) !important;
    transition: transform .18s ease !important;
  }

  body.wolf-v7-ready.wolf-v7-open .wolf-v7-sidebar {
    transform: translateX(0) !important;
  }
}

/* Sicherheitsklasse für alte versteckte Sidebar-Regeln */
body.wolf-v7-ready .wolf-v7-sidebar.wolf-v3-hidden,
body.wolf-v7-ready .wolf-v7-sidebar.wolf-v4-hidden,
body.wolf-v7-ready .wolf-v7-sidebar.wolf-v5-hidden,
body.wolf-v7-ready .wolf-v7-sidebar.wolf-v6-hidden-old {
  display: block !important;
}
