@import url('/_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css');

.content {
  padding: 0.5rem 1.5rem 2rem;
  width: 100%;
  min-height: 100%;
}

#main-menu {
  padding-top: 12px;
  height: 100%;
}

/* A heading that wraps, such as Collection Management, stays left-aligned like the pages under it. */
#main-menu .fluent-navcategoryitem {
  text-align: left;
}

/* The pane's toggle, styled like Fluent's own hamburger, and the icon rail it collapses to. */
.nav-toggle,
.nav-rail-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: var(--borderRadiusMedium, 4px);
  background: transparent;
  cursor: pointer;
}

/* The KERIA mark beside the name in the header. */
.brand-logo {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  flex: none;
}

.nav-toggle {
  margin: 0 8px 0 0;
  color: var(--colorNeutralForegroundOnBrand, #fff);
}

.nav-toggle:hover {
  background-color: var(--colorBrandBackgroundPressed, #0c3b5e);
}

.fluent-layout[mobile] .nav-toggle {
  display: none;
}

.nav-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 56px;
  height: 100%;
  padding-top: 12px;
}

.nav-rail-item {
  color: var(--colorNeutralForeground2, #424242);
}

.nav-rail-item:hover:not(:disabled) {
  background-color: var(--colorNeutralBackground2Hover, #f0f0f0);
}

.nav-rail-item.active {
  color: var(--colorBrandForeground1, #0f6cbd);
  background-color: var(--colorNeutralBackground2Selected, #e0e0e0);
}

.nav-rail-item:disabled {
  color: var(--colorNeutralForegroundDisabled, #bdbdbd);
  cursor: default;
}

.user-menu-account {
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
}

.user-menu-roles {
  color: var(--colorNeutralForeground3);
}

.user-menu-theme {
  padding: 4px 8px 8px;
}

/* The user's name sits on the brand-coloured header, so it uses the header's colours, not a subtle button's. */
#user-menu {
  color: var(--colorNeutralForegroundOnBrand, #fff);
}

#user-menu:hover {
  background-color: var(--colorBrandBackgroundPressed, #0c3b5e);
}

/*
  The header search (design D83). Fluent's header clips what overflows it, which would hide the results below the
  box; this selector outranks Fluent's, whose styles load after these.
*/
.fluent-layout .fluent-layout-item[area=header] {
  overflow: visible;
}

.header-search {
  display: flex;
  flex: 1;
  justify-content: center;
  min-width: 0;
  margin: 0 16px;
}

.fluent-layout[mobile] .header-search {
  margin: 0 8px;
}

.global-search {
  position: relative;
  width: min(480px, 100%);
}

.global-search-input {
  box-sizing: border-box;
  width: 100%;
  height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--borderRadiusMedium, 4px);
  background: var(--colorNeutralBackground1, #fff);
  color: var(--colorNeutralForeground1, #242424);
  font: inherit;
}

.global-search-input:focus {
  outline: none;
  border-color: var(--colorBrandStroke1, #0f6cbd);
}

.global-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 100;
  max-height: 70vh;
  overflow-y: auto;
  padding: 4px 0;
  border-radius: var(--borderRadiusMedium, 4px);
  background: var(--colorNeutralBackground1, #fff);
  color: var(--colorNeutralForeground1, #242424);
  box-shadow: var(--shadow16, 0 8px 16px rgba(0, 0, 0, 0.14));
}

.global-search-kind {
  padding: 6px 12px 2px;
  font-size: var(--fontSizeBase200, 12px);
  font-weight: 600;
  color: var(--colorNeutralForeground3, #616161);
}

.global-search-result,
.global-search-all {
  display: flex;
  flex-direction: column;
  padding: 6px 12px;
  color: inherit;
  text-decoration: none;
}

.global-search-result:hover,
.global-search-result:focus,
.global-search-all:hover,
.global-search-all:focus {
  background: var(--colorNeutralBackground1Hover, #f5f5f5);
}

.global-search-detail,
.search-detail {
  font-size: var(--fontSizeBase200, 12px);
  color: var(--colorNeutralForeground3, #616161);
}

.global-search-all {
  border-top: 1px solid var(--colorNeutralStroke2, #e0e0e0);
  color: var(--colorBrandForegroundLink, #0f6cbd);
}

.global-search-note {
  margin: 0;
  padding: 8px 12px;
  color: var(--colorNeutralForeground3, #616161);
}

.search-results {
  list-style: none;
  margin: 8px 0 16px;
  padding: 0;
}

.search-results li {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

.page-message {
  margin: 8px 0;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.actions,
.month,
.search,
.tiles {
  margin: 12px 0;
}

.search {
  max-width: 480px;
}

.tile-value {
  font-size: 2rem;
  font-weight: 600;
}

.intro {
  max-width: 70ch;
}

/* Agent Installs: the parts that arrive later, the parameter table and the example commands. */
.coming-soon {
  max-width: 70ch;
  padding: 8px 12px;
  border-left: 3px solid var(--colorNeutralStroke1, #d1d1d1);
  color: var(--colorNeutralForeground3, #616161);
}

.parameters {
  border-collapse: collapse;
  max-width: 1000px;
  margin: 8px 0 16px;
}

.parameters th,
.parameters td {
  padding: 6px 12px;
  border-bottom: 1px solid var(--colorNeutralStroke2, #e0e0e0);
  text-align: left;
  vertical-align: top;
}

pre.command {
  max-width: 1000px;
  padding: 8px 12px;
  overflow-x: auto;
  border-radius: var(--borderRadiusMedium, 4px);
  background: var(--colorNeutralBackground3, #f5f5f5);
}

/* An installer to download (D106): its details, then the button. A hash breaks anywhere to fit a phone. */
.package {
  margin-bottom: 24px;
}

/* A stack trace in a side panel wraps rather than scrolling sideways. */
pre.exception {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* The product's icon beside its details. */
.package-summary {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.package-summary img {
  flex: none;
  margin-top: 12px;
}

.package code {
  word-break: break-all;
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
  margin: 12px 0;
}

.facts dt {
  font-weight: 600;
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.conflict {
  margin: 12px 0;
  max-width: 900px;
}

.confirm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.import {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
  align-items: flex-start;
}

.file-pick {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#blazor-error-ui {
  background: var(--colorPaletteYellowBackground1, lightyellow);
  color: var(--colorNeutralForeground1, #242424);
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

.loading-progress {
  position: relative;
  display: block;
  width: 8rem;
  height: 8rem;
  margin: 20vh auto 1rem auto;
}

.loading-progress circle {
  fill: none;
  stroke: var(--colorNeutralStroke2, #e0e0e0);
  stroke-width: 0.6rem;
  transform-origin: 50% 50%;
  transform: rotate(-90deg);
}

.loading-progress circle:last-child {
  stroke: var(--colorBrandForeground1, #0f6cbd);
  stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
  transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
  position: absolute;
  text-align: center;
  font-weight: bold;
  inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
  content: var(--blazor-load-percentage-text, "Loading");
}

/* Charts (design D73) */
.ranges {
  margin: 12px 0;
}

.charts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 16px;
}

.chart {
  margin: 0;
}

.chart figcaption {
  font-weight: 600;
  margin-bottom: 4px;
}

.chart svg {
  width: 100%;
  height: auto;
}

.chart .grid {
  stroke: var(--colorNeutralStroke2, #e0e0e0);
  stroke-width: 1;
}

.chart .line {
  fill: none;
  stroke: var(--colorBrandForeground1, #0f6cbd);
  stroke-width: 1.5;
}

.chart .band {
  fill: var(--colorBrandBackground2, #ebf3fc);
}

.chart .point {
  fill: var(--colorBrandForeground1, #0f6cbd);
}

.chart .axis,
.chart .empty {
  font-size: 11px;
  fill: var(--colorNeutralForeground3, #707070);
}

.resolution {
  display: block;
  margin-top: 8px;
}

/* Lists whose rows open in a side panel (design D86). */
.selectable tbody tr {
  cursor: pointer;
}

.membership-rules tbody tr.selected {
  background-color: var(--colorNeutralBackground1Selected);
}

/* The collection editor (design D86, membership rules as Configuration Manager arranges them). */
.collection-form,
.channel-form,
.rule-builder,
.item-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-actions {
  margin-top: 8px;
}

/*
  Side panels (SidePanel.razor) are Fluent drawers. Fluent fits a dialog's body to the screen and scrolls its content
  only inside fluent-dialog, so in a drawer the body grew with its content, ran off the bottom, and nothing scrolled.
  These do the same for a drawer: the body is the drawer's height, its content scrolls under the title, and scrolling
  past the end doesn't scroll the page behind.
*/
fluent-drawer > fluent-dialog-body {
  height: 100%;
  max-height: 100dvh;
  grid-template-rows: min-content minmax(0, 1fr) min-content;
}

fluent-drawer > fluent-dialog-body::part(content) {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.condition-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.condition-children {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 0 12px;
  padding-left: 12px;
  border-left: 2px solid var(--colorNeutralStroke2);
}

.item-picker-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 50vh;
  overflow-y: auto;
}

/* Where an agent setting came from, after its value. */
.setting-source {
  color: var(--colorNeutralForeground3);
}

/* Why a looser agent policy setting was refused (design §7.9). */
.policy-problem {
  color: var(--colorPaletteDarkOrangeForeground1, #bc4b09);
  font-size: var(--type-ramp-minus-1-font-size);
}

.agent-settings-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert-comments {
  margin: 8px 0 16px;
  padding-left: 20px;
}

/* One OID an SNMP target reads, its fields side by side where there's room. */
.oid-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--colorNeutralStroke2, #e0e0e0);
}

/* A list in a fact, such as an agent's coming maintenance windows. */
.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A group of checkboxes in a form, such as a route's channels. */
.choices {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: none;
  margin: 0;
  padding: 0;
}

.choices legend {
  padding: 0;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: inherit;
  line-height: inherit;
}

/* Short choices side by side, wrapping, such as the actions of one area's permissions. */
.choices.across {
  flex-direction: row;
  flex-wrap: wrap;
  column-gap: 16px;
}

/* Dashboards (design D97): widgets on four columns, one on a phone. */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-grid .widget {
  min-width: 0;
}

.widget-title {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.widget-alerts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget-alerts li {
  padding: 4px 0;
}

.status-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.status-cell {
  padding: 4px 8px;
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
}

.status-cell.healthy {
  background: #107c10;
}

.status-cell.warning {
  background: #8a5300;
}

.status-cell.critical {
  background: #c50f1f;
}

@media (max-width: 700px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid .widget {
    grid-column: auto !important;
  }
}
