/* Подсказки для новых пользователей ERP */
.has-hint {
  position: relative;
}

.hint-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  margin-left: 0.35rem;
  padding: 0;
  border: 1px solid #94a3b8;
  border-radius: 50%;
  background: #fff;
  color: #475569;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.sidebar .hint-trigger {
  border-color: #484f58;
  background: #21262d;
  color: #8b949e;
}

.hint-trigger:hover,
.hint-trigger:focus-visible,
.hint-trigger.is-open {
  border-color: var(--ozon);
  color: var(--ozon);
  outline: none;
}

.hint-pop {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 220px;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  pointer-events: none;
  z-index: 1000;
}

.hint-pop::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1e293b;
}

.hint-trigger:hover .hint-pop,
.hint-trigger:focus-visible .hint-pop,
.hint-trigger.is-open .hint-pop {
  display: block;
}

.nav a.has-hint {
  padding-right: 0.5rem;
}

.nav a .hint-trigger {
  margin-left: auto;
  margin-right: 0;
}

.hints-toggle {
  padding: 0.65rem 1.25rem 0.5rem;
  border-top: 1px solid #30363d;
}

.hints-toggle label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: #8b949e;
  cursor: pointer;
  user-select: none;
}

.hints-toggle input {
  accent-color: var(--ozon);
}

.hints-toggle--light {
  padding: 0 0 0.65rem;
  border-top: none;
}

.hints-toggle--light label {
  color: var(--muted);
}

body.hints-off .hint-trigger {
  display: none !important;
}

.detail-metric-bar.has-hint > .hint-trigger {
  margin-left: auto;
  order: 20;
}

.detail-metric-bar .detail-refresh {
  order: 19;
}

.topbar .filters.has-hint {
  align-items: center;
}

.topbar .filters > .hint-trigger {
  margin-left: 0.15rem;
}
