/*
------------------------------------------------------------------------------
 NodeSniff Agent - Lightweight Linux metrics collector

 Author: Sebastian Zieba <sebastian@zieba.art>
 License: GNU GPL v3 (non-commercial use only)

 This software is licensed under the terms of the GNU General Public License
 version 3 (GPLv3) as published by the Free Software Foundation, for
 non-commercial use only.

 For commercial licensing, please contact the author directly.
------------------------------------------------------------------------------
*/
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Navbar */
.ns-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 60px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
  z-index: 99999;
  border-radius: 0;
  margin: 0;
}

.ns-navbar-brand {
  position: relative;
  display: inline-block;
  height: 36px;
  text-decoration: none;
}

.ns-logo {
  height: 36px;
  display: block;
}

.ns-subbrand {
  position: absolute;
  bottom: 6px;
  left: calc(100% + 8px); /* 8px spacing from the logo */
  font-size: 0.85em;
  color: #fff;
  white-space: nowrap;
  line-height: 1;
}

.ns-navbar-right {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-left: auto;
}

.ns-welcome {
  font-weight: 500;
  color: #fff;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  text-align: right;
}

/* Avatar + dropdown */
.ns-avatar-dropdown {
  position: relative;
  display: inline-block;
}

.ns-avatar {
  color: #fff;
  font-size: 1.7rem;
  vertical-align: middle;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.13s;
  padding: 2px;
}
.ns-avatar:hover,
.ns-avatar:focus {
  background: #1e293b;
}
.ns-dropdown-menu {
  display: none;
  position: absolute;
  top: 43px;
  right: 3px;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  min-width: 160px;
  z-index: 99999;
  overflow: hidden;
  font-size: 0.92rem;
}

.ns-avatar-dropdown.active .ns-dropdown-menu {
  display: block;
}

.ns-dropdown-item {
  display: block;
  padding: 6px 10px;
  color: #212529;
  text-decoration: none;
  font-size: 0.92rem;
  cursor: pointer;
  border-bottom: 1px solid #dee2e6;
  background: none;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}

.ns-dropdown-item:last-child {
  border-bottom: none;
}

.ns-dropdown-item:hover {
  background: #f8f9fa;
  color: #212529;
}

/* Reset GitHub + Material Icons in navbar (remove bg/border, unify look) */
.ns-navbar .ns-avatar,
.ns-navbar .ns-avatar:focus,
.ns-navbar .ns-avatar:hover,
.ns-navbar .material-icons,
.ns-navbar .material-icons:focus,
.ns-navbar .material-icons:hover,
.ns-navbar .ns-github-icon,
.ns-navbar .ns-github-icon:focus,
.ns-navbar .ns-github-icon:hover,
.ns-navbar #githubIcon,
.ns-navbar #githubIcon:focus,
.ns-navbar #githubIcon:hover {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  transition: none !important;
}
#githubIcon {
  border-radius: 0 !important;
}
.ns-github-icon {
  height: 20px;
  width: 20px;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

.nav_btn {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid #fff;
  color: white;
  font-size: 0.9em;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.nav_btn:hover {
  background-color: #007bff;
}

@media (max-width: 767px) {
  .ns-subbrand,
  .nav_btn {
    display: none !important;
  }
}

/* Icons in the navbar non-selectable / no tap-highlight */
.ns-navbar .ns-avatar,
.ns-navbar .material-icons,
.ns-navbar .ns-github-icon,
.ns-navbar .ns-logo {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none; /* iOS: disable context menu on long-press */
  -webkit-tap-highlight-color: transparent; /* Android/iOS: no blue flash */
}

/* Prevent dragging of image/SVG (accidental selections) */
.ns-navbar img,
.ns-navbar svg {
  -webkit-user-drag: none;
  user-drag: none;
}

/* Keep normal text selection inside dropdown content */
.ns-navbar [data-toggle-menu] {
  user-select: text;
}

/* Focus: hide outline on mouse click, keep it for keyboard */
.ns-navbar .ns-avatar:focus {
  outline: none;
}
.ns-navbar .ns-avatar:focus-visible {
  outline: 2px solid #6c757d; /* subtle focus for tab navigation */
  outline-offset: 2px;
}

.ns-quality-badge {
  position: absolute;
  top: -6px;
  left: 158px;
  font-size: 1rem;
  color: #ff0000;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: none;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

.ns-navbar-brand {
  position: relative;
}

.ns-quality-badge {
  position: absolute;
  top: -6px;
  right: -10px; /* zamiast left */
}
