/* ==== Left icon sidebar (shared by every page) ==== */
:root {
  --wxnav-width: 92px;
  --wxnav-bg: #131b2c;
  --wxnav-border: #2b3752;
  --wxnav-text: #8993ac;
  --wxnav-hover: #edf1fb;
  --wxnav-active: #34d399;
}

.wx-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--wxnav-width);
  background: var(--wxnav-bg);
  border-right: 1px solid var(--wxnav-border);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 10px 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  scrollbar-width: none;
}
.wx-sidebar::-webkit-scrollbar { display: none; }

.wx-nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 11px 4px;
  color: var(--wxnav-text);
  text-decoration: none;
  font: 600 11px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0.02em;
  text-align: center;
  transition: color 0.2s ease;
}

.wx-nav-icon {
  display: flex;
  width: 32px;
  height: 32px;
  transition: transform 0.2s ease;
}
.wx-nav-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hover: the icon grows a bit */
.wx-nav-item:hover,
.wx-nav-item:focus-visible { color: var(--wxnav-hover); }
.wx-nav-item:hover .wx-nav-icon,
.wx-nav-item:focus-visible .wx-nav-icon { transform: scale(1.3); }
.wx-nav-item:focus-visible { outline: 2px solid var(--wxnav-active); outline-offset: -4px; border-radius: 8px; }

/* Current page */
.wx-nav-item.active { color: var(--wxnav-active); }
.wx-nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--wxnav-active);
}

body.has-wx-sidebar { padding-left: calc(var(--wxnav-width) + 16px); }

@media (prefers-reduced-motion: reduce) {
  .wx-nav-icon { transition: none; }
}

/* Phones: sidebar becomes a bottom bar you can swipe sideways */
@media (max-width: 680px) {
  .wx-sidebar {
    top: auto;
    right: 0;
    width: auto;
    height: auto;
    flex-direction: row;
    padding: 4px 6px;
    border-right: 0;
    border-top: 1px solid var(--wxnav-border);
    overflow-x: auto;
    overflow-y: hidden;
  }
  .wx-nav-item { flex: 0 0 72px; padding: 8px 2px; font-size: 10.5px; }
  .wx-nav-icon { width: 26px; height: 26px; }
  .wx-nav-item.active::before { left: 12px; right: 12px; top: 0; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  body.has-wx-sidebar { padding-left: 8px; padding-bottom: 84px; }
}
