:root {
  --admin-nav-bg-color: var(--color-bg-dark);
  --admin-nav-bg-color-tint: var(--color-bg-dark);
  --admin-nav-item-text-color: color(var(--color-text-white) alpha(-37%));
  --admin-nav-item-text-active-color: var(--color-text-white);
  --page-header-padding: 2.375rem;
}

.AdminNav {
  background: var(--color-admin-navbar);
  color: var(--color-text-white);
  font-size: 0.85rem;
}

.AdminNav .NavItem {
  color: color(var(--color-text-white) alpha(-37%));
}

.AdminNav .NavItem:hover,
.AdminNav .NavItem.is--selected {
  color: var(--color-text-white);
}

/* TODO: this feels itchy. should refactor .NavItem.is--selected to be less cascadey */
.AdminNav .NavItem:hover:after,
.AdminNav .NavItem.is--selected:after {
  display: none;
}

.AdminNav .NavDropdown.open .NavDropdown-button,
.AdminNav .NavDropdown .NavDropdown-content-layer {
  background-color: var(--color-bg-dark);
}

.AdminNav .Dropdown-item:hover {
  background-color: var(--color-bg-dark);
}

/* utility to get a simple common hover state for admin items */
.HoverItem:hover,
.AdminHoverItem:hover {
  background-color: var(--color-bg-medium);
  transition: background 0.2s linear;
}

.AdminNav .Dropdown-chevron {
  color: var(--color-text-white);
}

.Actions-group {
  margin-bottom: 2em;
}

.Actions-group:last-child {
  margin-bottom: 0;
}

.Actions-groupLabel {
  font-size: 1em;
  margin-bottom: 1em;
}

.ContentTable {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  text-align: left;
}

.ContentTable thead {
  border-bottom: 1px solid var(--color-border);
}

.AdminBadge {
  background-color: var(--color-accent2);
  border-radius: 4px;
  color: var(--color-text-white);
  padding: 0.25em;
}
.PageHeader {
  padding-top: var(--page-header-padding);
  padding-bottom: var(--page-header-padding);
}

.PageTitle {
  margin: 0;
}

.Table-actions {
  text-align: right;
}

.ContentTable .Table-actions {
  opacity: 0;
}

.ContentTable td,
.ContentTable th {
  padding: 1em;
}

/* TODO: remove this and apply AdminHoverItem to content rows */
.ContentTable tbody tr:hover {
  background-color: color(var(--color-brand) alpha(-96%));
}

.ContentTable tr:hover .Table-actions {
  opacity: 1;
  transition: opacity 0.2s linear;
}

.AdminList {
  background-color: var(--color-bg-light);
  border: var(--border-size) var(--border-style) var(--color-border);
  border-radius: var(--default-border-radius);
  width: 266px;
  box-shadow: inset -1px -1px 3px var(--color-shadow);
  padding-bottom: 0.75em;
}

.AdminList-search {
  position: relative;
}

.AdminList-search .Icon {
  position: absolute;
  margin-top: auto;
  margin-bottom: auto;
  top: 0;
  bottom: 0;
  margin: auto;
  margin-left: 1em;
  color: var(--color-text-light);
}

.AdminList-search .AdminInput {
  padding: 0.5em;
  padding-left: 2em;
  font-size: 18px;
  width: 100%;
  border-top-left-radius: var(--default-border-radius);
  border-top-right-radius: var(--default-border-radius);
  border-bottom-color: var(--color-border);
}

.AdminList-item {
  padding: 0.75em 1em 0.75em 1em;
  border: var(--border-size) var(--border-style) transparent;
  border-radius: var(--default-border-radius);
  margin-bottom: 0.25em;
}

.AdminList-item.selected {
  color: var(--color-brand);
}

.AdminList-item.selected,
.AdminList-item:hover {
  background-color: white;
  border-color: var(--color-border);
  margin-left: -0.5em;
  margin-right: -0.5em;
  padding-left: 1.5em;
  padding-right: 1.5em;
  box-shadow: 0 1px 2px var(--color-shadow);
}

.AdminList-section {
  margin-top: 1em;
  padding: 0.5em 1em 0.5em 1em;
  text-transform: uppercase;
  color: var(--color-text-light);
  font-weight: 700;
  font-size: smaller;
  padding-right: 15px; /* set so that table visibility icons align */
}

.AdminInput {
  color: var(--color-text-dark);
  padding: var(--padding-1);
  background-color: var(--color-bg-light);
  border: 1px solid transparent;
}
.AdminInput:focus {
  border-color: var(--color-brand);
  box-shadow: none;
  outline: 0;
}

.AdminSelect {
  display: inline-block;
  padding: 0.6em;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-white);
  border-radius: var(--default-border-radius);
  font-weight: 700;
  min-width: 104px;
}

.AdminSelect:hover {
  border-color: color(var(--color-border) blackness(+10%));
}

.AdminSelectBorderless {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 3px;
}

.AdminSelect--borderless {
  border: none !important;
}
.AdminSelect--borderless .AdminSelect-content {
  margin-left: auto;
}
.AdminSelect--borderless .AdminSelect-chevron {
  margin-left: 0;
}

.AdminSelect-chevron {
  opacity: 0.75;
}

.AdminSelect:hover .AdminSelect-chevron {
  opacity: 1;
}

.MetadataTable {
  min-width: 800px;
}

.MetadataTable-title {
  background-color: var(--color-bg-white);
}

.TableEditor-table-name {
  font-size: 24px;
}

.TableEditor-field-name {
  font-size: 16px;
}

.TableEditor-table-description,
.TableEditor-field-description {
  font-size: 14px;
}

.TableEditor-field-visibility {
  /*color: var(--color-warning);*/
}

.TableEditor-field-visibility .ColumnarSelector-row:hover {
  background-color: var(--color-brand) !important;
  color: white !important;
}

.TableEditor-field-type {
  /*color: var(--color-accent2);*/
}

.TableEditor-field-type .ColumnarSelector-row:hover {
  background-color: var(--color-brand) !important;
  color: white !important;
}

.TableEditor-field-special-type,
.TableEditor-field-target {
  margin-top: 3px;
  /*color: var(--color-accent1);*/
}

.TableEditor-field-special-type .ColumnarSelector-row:hover,
.TableEditor-field-target .ColumnarSelector-row:hover {
  background-color: var(--color-brand) !important;
  color: white !important;
}

.SaveStatus {
  line-height: 1;
}

.SaveStatus:last-child {
  border-right: none !important;
}

.SettingsInput {
  width: 400px;
}

.SettingsPassword {
  width: 200px;
}

.UserActionsSelect {
  padding-top: 1em;
  min-width: 180px;
}

.AdminTable {
  border-collapse: collapse;
  border-spacing: 0;
  text-align: left;
}

.AdminTable th {
  text-transform: uppercase;
  color: var(--color-text-medium);
  padding: var(--padding-1);
  font-weight: normal;
}

.AdminTable thead {
  border-bottom: var(--border-size) var(--border-style) var(--color-border);
}

.AdminTable tbody tr:first-child td {
  padding-top: var(--margin-1);
}

.AdminLink {
  opacity: 0.435;
}

.AdminLink:hover {
  opacity: 1;
}

.ColumnSortHelper {
  box-shadow: 0 7px 20px var(--color-shadow);
}

#formField-details-port .Form-input,
#formField-details-tunnel-port .Form-input {
  max-width: 200px !important;
}

#formField-details-password .Form-input {
  margin-bottom: 2em;
}
