/*
 * NBX Digital Nubexx parity theme.
 *
 * Goal: preserve the compact Nubexx Redmine operating layout on NBX Digital
 * Redmine. This is a Redmine theme override only; plugin
 * parity still needs the WZ-117/WZ-118 admin runbook.
 */

:root {
  --nbx-brand: #0f9ed5;
  --nbx-brand-dark: #0f9ed5;
  --nbx-accent: #61e5a3;
  --nbx-text: #523c3c;
  --nbx-border: #d7dde0;
  --nbx-surface: #ffffff;
  --nbx-surface-muted: #f5f5f5;
  --nbx-link: #153085;
}

html,
body {
  margin: 0;
  background: var(--nbx-surface);
  color: var(--nbx-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
  font-size: 14px;
}

.hidden {
  display: none !important;
}

a,
a:link,
a:visited {
  color: var(--nbx-link);
}

#top-menu {
  display: none !important;
  min-height: 0;
  height: 0;
  overflow: hidden;
  background: var(--nbx-brand-dark);
  border: 0;
  padding: 0;
}

#header {
  position: relative;
  min-height: 43px;
  height: 43px;
  padding: 0;
  background: var(--nbx-brand);
  color: #fff;
  box-sizing: border-box;
  overflow: visible;
}

#header h1 {
  margin: 0;
  width: 270px;
  padding-left: 20px;
  border-right: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  font-size: 0;
  line-height: 43px;
  font-weight: 600;
  box-sizing: border-box;
}

#header h1::before {
  content: "";
  display: inline-block;
  width: 142px;
  height: 24px;
  margin-top: 9px;
  background: url("/assets/themes/nbxdigital_nubexx_parity/nubexx-header-logo-0e3feee8.svg") left center / 142px auto no-repeat;
  vertical-align: top;
  font-size: 0;
}

#header h1::after {
  content: "";
}

#quick-search,
#account {
  top: 8px;
}

#quick-search {
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  right: 20px;
  top: 6px;
  width: 680px;
  height: 32px;
  color: #fff;
  justify-content: flex-start;
  white-space: nowrap;
  z-index: 20;
}

#quick-search::before {
  content: "git";
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  width: 190px;
  flex: 0 0 190px;
  height: 32px;
  margin-right: 12px;
  padding-left: 162px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M2 8.2 8 3l6 5.2-1 1.1-1-.8V14H9.5V9.8h-3V14H4V8.5l-1 .8z'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='1.6' d='M2.5 4.5h4l1 1h6v6h-11z'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M3 4h10v2H3zm0 3h10v2H3zm0 3h10v2H3z'/%3E%3C/svg%3E");
  background-position: 0 50%, 41px 50%, 162px 50%;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  opacity: .95;
}

#quick-search form,
#quick-search p {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin: 0;
}

#quick-search form {
  position: absolute;
  top: 0;
  left: 218px;
  width: 330px;
  height: 32px;
}

#quick-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

#quick-search input[type="text"],
#quick-search input[type="search"] {
  width: 330px;
  height: 32px;
  padding: 4px 34px 4px 12px;
  border: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, .24);
  color: #fff;
  box-sizing: border-box;
}

#quick-search input[type="text"]::placeholder,
#quick-search input[type="search"]::placeholder {
  color: rgba(255, 255, 255, .9);
}

#project-jump {
  display: inline-block;
  flex: 0 0 auto;
  margin-left: 0;
  color: #fff;
}

#project-jump .drdn-trigger {
  display: block;
  width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

#account,
#account a,
#loggedas,
#loggedas a {
  color: #fff;
}

#account {
  display: block !important;
  position: absolute;
  top: 6px;
  right: 18px;
  width: 59px;
  height: 32px;
  overflow: hidden;
  font-size: 0;
  z-index: 25;
}

#account::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 8px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #f0f0f0 0 20%, #9ea6b8 21% 100%);
}

#account::after {
  content: "";
  position: absolute;
  top: 13px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

#issue_badge {
  display: block !important;
  position: absolute;
  top: 6px;
  right: 82px;
  width: 60px;
  height: 32px;
  overflow: hidden;
  font-size: 0;
  z-index: 25;
}

#issue_badge::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 8px;
  width: 22px;
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cpath fill='white' d='M11 20a2.4 2.4 0 0 0 2.35-2h-4.7A2.4 2.4 0 0 0 11 20Zm7-5-1.7-2.2V9a5.3 5.3 0 0 0-4.1-5.2V2h-2.4v1.8A5.3 5.3 0 0 0 5.7 9v3.8L4 15v1h14v-1Z'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
}

#issue_badge::after {
  content: "0";
  position: absolute;
  top: 15px;
  left: 31px;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  background: #ff4b00;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}

#main-menu {
  position: absolute !important;
  top: 43px !important;
  bottom: auto !important;
  left: 0;
  right: 0;
  height: 40px;
  margin: 0;
  padding: 0 12px;
  background: #f5f5f5;
  border-bottom: 1px solid var(--nbx-border);
  box-sizing: border-box;
}

#main-menu ul {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}

#main-menu li {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
}

#main-menu li a,
#main-menu li a.selected,
#main-menu .menu-children li a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  color: var(--nbx-text);
  line-height: 40px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-weight: 500;
}

#main-menu a.new-object {
  min-width: 32px;
  justify-content: center;
  padding: 0 8px;
  font-weight: 700;
}

#main-menu a.projects,
#main-menu a.news {
  display: none !important;
}

#main-menu .menu-children {
  display: none;
  position: absolute;
  top: 40px;
  left: 0;
  z-index: 900;
  min-width: 210px;
  padding: 4px 0;
  border: 1px solid var(--nbx-border);
  background: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}

#main-menu li:hover > .menu-children,
#main-menu .menu-children.visible {
  display: block;
}

#main-menu .menu-children li {
  display: block;
}

#main-menu .menu-children li a {
  display: block;
  height: auto;
  min-height: 26px;
  padding: 5px 10px;
  line-height: 18px;
  white-space: nowrap;
}

#main-menu li a:hover,
#main-menu li a.selected {
  color: #002b66;
  background: #fff;
  border-bottom: 3px solid #183186;
}

#main {
  clear: both;
  margin: 40px 0 0;
  padding: 0;
  background: var(--nbx-surface);
}

body.controller-welcome #main {
  margin-top: 0;
}

body.controller-welcome #content {
  padding-top: 20px;
  min-height: calc(100vh - 43px);
}

body.controller-welcome #sidebar {
  display: none !important;
}

body.controller-welcome .contextual {
  float: right;
  width: 30px;
  height: 28px;
  margin: 0;
  overflow: hidden;
}

body.controller-welcome .contextual .dashboard-locked {
  display: none !important;
}

body.controller-welcome .contextual .icon-label {
  display: none !important;
}

body.controller-welcome .contextual .drdn-trigger {
  width: 30px;
  height: 28px;
  justify-content: center;
  padding: 0;
}

body.controller-welcome h1,
body.controller-welcome h2 {
  height: 27px;
  margin-bottom: 20px;
  margin-top: 0;
  font-size: 22px;
  line-height: 27px;
}

body.controller-welcome h2::after {
  content: "\00a0\00bb\00a0Welcome";
}

body.controller-welcome .splitcontent {
  display: grid !important;
  grid-template-columns: calc(50% - 10px) calc(50% - 10px) !important;
  column-gap: 20px !important;
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
}

body.controller-welcome .splitcontenttop,
body.controller-welcome .splitcontentbottom {
  display: none !important;
}

body.controller-welcome .splitcontentleft,
body.controller-welcome .splitcontentright {
  float: none !important;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
}

body.controller-welcome .splitcontentleft {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

body.controller-welcome .splitcontentright {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

body.controller-welcome .dashboard .contextual,
body.controller-welcome .dashboard .settings,
body.controller-welcome .dashboard .mypage-box .buttons,
body.controller-welcome .dashboard select.dashboard-block-select {
  display: none !important;
}

body.controller-welcome .dashboard h3 a {
  text-decoration: none;
}

body.controller-welcome .block-issuequery table.list th.checkbox,
body.controller-welcome .block-issuequery table.list td.checkbox {
  display: none !important;
}

body.controller-welcome .block-issuequery table.list th,
body.controller-welcome .block-issuequery table.list td {
  height: 32px;
  padding-top: 2px;
  padding-bottom: 2px;
}

body.controller-welcome .block-issuequery table.list td.id a {
  display: inline-block;
  min-width: 43px;
  padding: 2px 6px;
  border-radius: 3px;
  background: #009be0;
  color: #fff;
  line-height: 16px;
  text-align: center;
  text-decoration: none;
}

body.controller-welcome .block-issuequery table.list td.id a::before {
  content: "#";
}

body.controller-welcome .block-issuequery table.list td.tracker {
  color: transparent;
  font-size: 0;
  text-align: center;
}

body.controller-welcome .block-issuequery table.list td.tracker::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 2px;
  background: #009be0;
  vertical-align: middle;
}

body.controller-welcome .block-issuequery table.list td.status {
  color: transparent;
  font-size: 0;
  text-align: center;
}

body.controller-welcome .block-issuequery table.list tr.status-1 td.status::before,
body.controller-welcome .block-issuequery table.list tr.status-10 td.status::before,
body.controller-welcome .block-issuequery table.list tr.status-12 td.status::before {
  display: inline-block;
  min-width: 36px;
  padding: 2px 7px;
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  text-transform: uppercase;
}

body.controller-welcome .block-issuequery table.list tr.status-1 td.status::before {
  content: "NEW";
  background: #7c8fc4;
}

body.controller-welcome .block-issuequery table.list tr.status-10 td.status::before {
  content: "ON HOLD";
  background: #009be0;
}

body.controller-welcome .block-issuequery table.list tr.status-12 td.status::before {
  content: "DONE";
  background: #087a16;
}

body.controller-welcome .block-issuequery table.list td.priority {
  color: transparent;
  font-size: 0;
  text-align: center;
}

body.controller-welcome .block-issuequery table.list td.priority::before {
  content: "\2192";
  color: #1aa52d;
  font-size: 20px;
  font-weight: 700;
  line-height: 18px;
}

#content {
  min-height: calc(100vh - 83px);
  padding: 18px 20px 40px;
  background: var(--nbx-surface);
  border: 0;
  box-sizing: border-box;
}

#main.nosidebar #content,
.nosidebar #content {
  width: auto;
  margin: 0;
}

#sidebar {
  position: relative;
  float: left;
  width: 270px;
  min-height: calc(100vh - 83px);
  margin: 0;
  padding: 18px 14px;
  background: #f8faf9;
  border-right: 1px solid var(--nbx-border);
  border-left: 0;
  box-sizing: border-box;
}

#sidebar + #content,
#main:not(.nosidebar) #content {
  margin-left: 279px;
  margin-right: 0;
  width: auto;
}

#main:not(.nosidebar)::after {
  clear: both;
  content: "";
  display: table;
}

body.controller-issues #sidebar,
body.controller-agile_boards #sidebar,
body.controller-projects.action-show #sidebar {
  float: left !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.controller-issues #content,
body.controller-agile_boards #content,
body.controller-projects.action-show #content {
  margin-left: 279px !important;
  margin-right: 0 !important;
  width: auto !important;
}

body.controller-projects.action-show #main.nosidebar #content,
body.controller-projects.action-show.nosidebar #content {
  margin-left: 0 !important;
}

#sidebar h2,
#sidebar h3 {
  color: var(--nbx-brand);
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
}

.contextual {
  margin: 0 0 12px;
  line-height: 24px;
}

.drdn {
  position: relative;
  display: inline-block;
}

.drdn-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.drdn-content {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 1000;
  min-width: 220px;
  max-width: 360px;
  padding: 6px 0;
  border: 1px solid var(--nbx-border);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
  color: var(--nbx-text);
}

.drdn.open > .drdn-content,
.drdn.expanded > .drdn-content,
.drdn:hover > .drdn-content {
  display: block;
}

#project-jump .drdn-content {
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  width: 320px;
  max-width: min(320px, calc(100vw - 32px));
}

.drdn-content .quick-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--nbx-border);
}

.drdn-content .quick-search input {
  width: 100%;
  height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--nbx-border);
  border-radius: 3px;
  box-sizing: border-box;
}

.drdn-items strong,
.drdn-items a {
  display: block;
}

.drdn-items strong {
  padding: 7px 10px 4px;
  color: var(--nbx-brand);
  font-size: 12px;
}

.drdn-items a,
.drdn-items a.icon,
.drdn-items a.icon-only {
  min-height: 0;
  padding: 6px 10px !important;
  line-height: 18px;
  white-space: nowrap;
}

.drdn-items a:hover {
  background: #eef6f3;
  text-decoration: none;
}

.contextual > span,
.contextual .drdn,
.contextual .drdn-trigger {
  vertical-align: middle;
}

.contextual .drdn-trigger {
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--nbx-link);
}

.contextual .drdn-trigger:hover {
  background: #eef6f3;
  text-decoration: none;
}

.icon-svg,
svg.icon-svg {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
  fill: currentColor;
}

.icon-only .icon-label {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
}

.contextual a,
.contextual a.icon,
.contextual a.icon-only,
#content a.icon,
#content a.icon-only,
#sidebar a.icon,
#sidebar a.icon-only,
#main-menu a.icon,
#main-menu a.icon-only {
  min-height: 20px;
  padding-left: 0 !important;
  background-image: none !important;
}

.contextual a::before,
.contextual a::after,
.contextual a.icon::before,
.contextual a.icon::after,
.contextual a.icon-only::before,
.contextual a.icon-only::after,
#content a.icon::before,
#content a.icon::after,
#content a.icon-only::before,
#content a.icon-only::after,
#sidebar a.icon::before,
#sidebar a.icon::after,
#sidebar a.icon-only::before,
#sidebar a.icon-only::after,
#main-menu a.icon::before,
#main-menu a.icon::after,
#main-menu a.icon-only::before,
#main-menu a.icon-only::after {
  display: none !important;
  content: none !important;
}

#sidebar ul {
  list-style: none;
  padding-left: 0;
}

#sidebar li {
  margin: 0 0 7px;
}

.contextual a,
input[type="submit"],
button,
.buttons a,
a.button {
  border-radius: 3px;
}

input[type="submit"],
button,
a.button {
  border: 1px solid var(--nbx-border);
  background: #f7faf9;
  color: var(--nbx-brand);
  font-weight: 600;
}

input[type="submit"]:hover,
button:hover,
a.button:hover {
  border-color: var(--nbx-accent);
  background: #ecfff6;
}

table.list {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--nbx-border);
}

table.list th {
  background: #eef3f2;
  color: var(--nbx-brand);
  font-weight: 700;
}

table.list td,
table.list th {
  padding: 6px 8px;
  border-color: var(--nbx-border);
}

table.list tbody tr:hover {
  background: #f5fbf8;
}

body.controller-admin table.plugins,
body.controller-admin table.list.plugins {
  width: 100%;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
}

body.controller-admin table.plugins thead,
body.controller-admin table.list.plugins thead {
  display: none;
}

body.controller-admin table.plugins tr,
body.controller-admin table.list.plugins tr {
  background: #f3f3f3;
}

body.controller-admin table.plugins tr:nth-child(even),
body.controller-admin table.list.plugins tr:nth-child(even) {
  background: #ffffff;
}

body.controller-admin table.plugins td,
body.controller-admin table.list.plugins td {
  min-height: 48px;
  padding: 10px 8px;
  border: 0;
  vertical-align: top;
}

body.controller-admin table.plugins td:first-child,
body.controller-admin table.list.plugins td:first-child {
  padding-left: 10px;
}

body.controller-admin table.plugins td.name,
body.controller-admin table.list.plugins td.name,
body.controller-admin table.plugins td:first-child,
body.controller-admin table.list.plugins td:first-child {
  color: var(--nbx-text);
  font-size: 16px;
  font-weight: 600;
}

body.controller-admin table.plugins td.description,
body.controller-admin table.list.plugins td.description {
  font-size: 13px;
  font-weight: 400;
}

.query-columns,
#query_form_content,
.box {
  border-color: var(--nbx-border);
  border-radius: 4px;
  background: #fbfdfc;
}

.flash.notice,
.nodata,
.warning {
  border-radius: 4px;
}

.agile-board,
.agile-board table,
.agile-board .issue-card,
.controller-agile_boards .issue-card,
.controller-agile_boards table {
  font-size: 13px;
}

body.controller-agile_boards #content {
  overflow-x: auto;
}

body.controller-agile_boards table.list.issues-board,
body.controller-agile_boards table.agile-board,
body.controller-agile_boards .agile-board table {
  table-layout: fixed;
  min-width: 980px;
}

body.controller-agile_boards .agile-board th,
body.controller-agile_boards .agile-board td,
body.controller-agile_boards table.issues-board th,
body.controller-agile_boards table.issues-board td {
  min-width: 66px;
  width: 76px;
  padding-left: 6px;
  padding-right: 6px;
  vertical-align: top;
}

.agile-board .issue-card,
.issue-card,
.controller-agile_boards .issue-card {
  border-radius: 4px;
  border-color: var(--nbx-border);
  box-shadow: none;
}

body.controller-agile_boards .issue-card,
body.controller-agile_boards .agile-board .issue-card {
  box-sizing: border-box;
  min-width: 54px;
  max-width: 66px;
  margin: 8px auto;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

body.controller-agile_boards .issue-card a,
body.controller-agile_boards .issue-card span,
body.controller-agile_boards .issue-card div {
  overflow-wrap: break-word;
  word-break: normal;
}

body.controller-agile_boards #sidebar h3:first-of-type,
body.controller-agile_boards #sidebar h3:first-of-type + ul {
  display: none !important;
}

#query_form,
#query_form_content,
.query-form,
.filters,
.buttons {
  font-size: 13px;
}

fieldset.collapsible.collapsed > *:not(legend),
fieldset.collapsible.collapsed > div,
fieldset.collapsible.collapsed > table {
  display: none !important;
}

fieldset.collapsible.collapsed {
  min-height: 0;
  height: auto !important;
  padding-bottom: 4px;
}

fieldset.collapsible legend {
  cursor: pointer;
}

.contextual a.icon {
  min-height: 24px;
  line-height: 24px;
}

svg.icon-svg {
  width: 14px !important;
  height: 14px !important;
  vertical-align: -2px;
}

a.icon svg.icon-svg,
span.icon svg.icon-svg,
.contextual svg.icon-svg {
  margin-right: 4px;
}

#footer {
  border-top: 1px solid var(--nbx-border);
  background: #f8faf9;
  color: #6b7476;
}

@media screen and (max-width: 899px) {
  #header {
    height: auto;
    min-height: 83px;
  }

  #main-menu {
    height: auto;
    min-height: 40px;
  }

  #sidebar {
    float: none;
    width: auto;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--nbx-border);
  }

  #sidebar + #content,
  #main:not(.nosidebar) #content {
    margin-left: 0;
  }
}

