﻿:root {
  --custom-topbar-offset: 66px;
  --custom-topbar-height: 36px;
  --custom-topbar-right-gap: 1in;
}

.custom-topbar {
  position: fixed;
  top: var(--custom-topbar-offset);
  left: 250px;
  right: 0;
  height: var(--custom-topbar-height);
  background: var(--custom-topbar-bg, #f8f9fb);
  border-bottom: 1px solid #eef1f4;
  z-index: 1010;
}

.custom-topbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 12px;
  padding-right: var(--custom-topbar-right-gap);
}

.custom-topbar-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.custom-topbar-item {
  position: relative;
}

.custom-topbar-item:hover > .custom-topbar-submenu,
.custom-topbar-item:focus-within > .custom-topbar-submenu {
  display: block;
}

.custom-topbar-submenu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 180px;
  padding: 6px;
  padding-top: 10px;
  margin: 0;
  list-style: none;
  background: var(--custom-topbar-bg, #f8f9fb);
  border: 1px solid #e6e9ef;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  display: none;
  z-index: 1020;
}

.custom-topbar-submenu-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--custom-topbar-text, #4e5e6a);
  font-size: 13px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.custom-topbar-submenu-link:hover,
.custom-topbar-submenu-link:focus {
  background: var(--custom-topbar-hover-bg, #ffffff);
  color: var(--custom-topbar-hover-text, #1f2d3d);
  text-decoration: none;
}

.custom-topbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--custom-topbar-text, #4e5e6a);
  font-size: 13px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.custom-topbar-link:hover,
.custom-topbar-link:focus {
  background: var(--custom-topbar-hover-bg, #ffffff);
  color: var(--custom-topbar-hover-text, #1f2d3d);
  text-decoration: none;
}

.custom-topbar-link .icon,
.custom-topbar-link svg,
.custom-topbar-submenu-link .icon,
.custom-topbar-submenu-link svg {
  width: 16px;
  height: 16px;
}

.custom-topbar-empty {
  color: #9aa0a6;
  font-size: 12px;
}

.custom-topbar-config-link {
  color: #5d78ff;
  text-decoration: none;
}

body.custom-topbar-enabled .page-container {
  margin-top: calc(var(--custom-topbar-offset) + var(--custom-topbar-height)) !important;
}

.sidebar-toggled .custom-topbar {
  left: 70px;
}

@media (max-width: 990px) {
  .custom-topbar {
    left: 0;
  }
}
