/*
 * Clean-room NBX Redmine parity customizations.
 * This replaces the need for Nubexx private custom plugin/custom JS for
 * browser-visible layout behavior only.
 */

:root {
  --nbx-customize-brand: #183186;
  --nbx-customize-brand-light: #0f9ed5;
}

body.nbx-nubexx-parity #quick-search::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 632px;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath fill='white' d='m13.1 11.7 3.1 3.1-1.4 1.4-3.1-3.1a6 6 0 1 1 1.4-1.4ZM8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  pointer-events: none;
}

body.nbx-nubexx-parity #top-menu,
body.nbx-nubexx-parity #header,
body.nbx-nubexx-parity #main-menu {
  background: var(--nbx-customize-brand-light) !important;
  background-color: var(--nbx-customize-brand-light) !important;
}

body.nbx-nubexx-parity #quick-search input {
  caret-color: #fff;
}

body.nbx-nubexx-parity #quick-search {
  width: 760px;
}

body.nbx-nubexx-parity #quick-search form {
  left: 330px;
}

body.nbx-nubexx-parity #quick-search .nbx-header-shortcut {
  position: absolute;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 32px;
  text-decoration: none;
  opacity: .95;
  z-index: 24;
}

body.nbx-nubexx-parity #quick-search .nbx-header-shortcut:hover {
  color: #fff;
  text-decoration: underline;
}

body.nbx-nubexx-parity #quick-search .nbx-header-resources {
  left: 198px;
  width: 74px;
}

body.nbx-nubexx-parity #quick-search .nbx-header-people {
  left: 198px;
  width: 32px;
  color: transparent;
  font-size: 0;
  text-decoration: none;
}

body.nbx-nubexx-parity #quick-search .nbx-header-people::before {
  content: "";
  width: 16px;
  height: 16px;
  background: 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='M6.3 7.6a2.8 2.8 0 1 0 0-5.6 2.8 2.8 0 0 0 0 5.6Zm5.1.4a2.2 2.2 0 1 0 0-4.4 2.2 2.2 0 0 0 0 4.4ZM1 13.5c0-2.4 2.2-4.2 5.3-4.2s5.3 1.8 5.3 4.2V14H1v-.5Zm8.8-3.8c.5-.3 1-.4 1.6-.4 2.2 0 3.6 1.2 3.6 3V14h-2.2v-.5c0-1.5-.8-2.8-3-3.8Z'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}

body.nbx-nubexx-parity #main-menu li a {
  min-width: 0;
}

body.nbx-nubexx-parity .contextual .drdn-trigger,
body.nbx-nubexx-parity #project-jump .drdn-trigger {
  cursor: pointer;
}

body.nbx-nubexx-parity .contextual .drdn-content,
body.nbx-nubexx-parity #project-jump .drdn-content {
  display: none;
}

body.nbx-nubexx-parity .contextual .drdn:hover .drdn-content,
body.nbx-nubexx-parity .contextual .drdn.open .drdn-content,
body.nbx-nubexx-parity .contextual .drdn.expanded .drdn-content,
body.nbx-nubexx-parity #project-jump .drdn:hover .drdn-content,
body.nbx-nubexx-parity #project-jump .drdn.open .drdn-content,
body.nbx-nubexx-parity #project-jump .drdn.expanded .drdn-content {
  display: block;
}

body.nbx-nubexx-parity #admin-menu a.redmine-nbx-customize {
  font-weight: 600;
}

body.nbx-nubexx-parity.nbx-empty-sidebar #sidebar {
  display: none !important;
}

body.nbx-nubexx-parity.nbx-empty-sidebar #content,
body.nbx-nubexx-parity.nbx-empty-sidebar #main:not(.nosidebar) #content {
  margin-left: 0 !important;
  width: auto !important;
}

body.nbx-nubexx-parity.controller-my.action-page #content > p:first-child,
body.nbx-nubexx-parity.controller-my.action-page #content > form:first-child,
body.nbx-nubexx-parity.controller-my.action-page #content .contextual {
  float: right;
}

body.nbx-nubexx-parity.controller-my.action-page #content > p:first-child {
  font-size: 0;
}

body.nbx-nubexx-parity.controller-my.action-page .nbx-my-page-add-block {
  position: relative;
  display: inline-block;
  width: 250px;
  height: 28px;
  font-size: 13px;
}

body.nbx-nubexx-parity.controller-my.action-page .nbx-my-page-add-block-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 28px 0 9px;
  color: #555;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 2px;
  box-sizing: border-box;
  pointer-events: none;
  z-index: 1;
}

body.nbx-nubexx-parity.controller-my.action-page #content select {
  min-width: 250px;
  height: 28px;
  font-size: 13px;
}

body.nbx-nubexx-parity.controller-my.action-page #content select.nbx-my-page-add-block-select {
  position: relative;
  opacity: 0;
  z-index: 2;
}

body.nbx-nubexx-parity.controller-my.action-page #my-page .mypage-box > .contextual {
  display: none !important;
}

body.nbx-nubexx-parity.controller-resource_bookings .resource-planning-chart {
  table-layout: fixed;
}

body.nbx-nubexx-parity.controller-resource_bookings .resource-planning-chart td {
  vertical-align: top;
}

body.nbx-nubexx-parity.controller-resource_bookings .resource-planning-chart .gantt_hdr {
  position: absolute !important;
  top: 0;
  height: 16px;
  border-top: 1px solid #c0c0c0;
  border-bottom: 1px solid #c0c0c0;
  border-left: 1px solid #c0c0c0;
  box-sizing: border-box;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
}

body.nbx-nubexx-parity.controller-resource_bookings #gantt_area .gantt_hdr {
  border-left: 0;
  border-right: 1px solid #c0c0c0;
}

body.nbx-nubexx-parity.controller-resource_bookings .gantt_subjects,
body.nbx-nubexx-parity.controller-resource_bookings .resource-lines {
  position: relative;
  z-index: 1;
}

body.nbx-nubexx-parity.controller-issues #query_form fieldset {
  border: 0;
  border-bottom: 1px solid #e3e7e8;
  margin: 0 0 8px;
  padding: 10px 0;
}

body.nbx-nubexx-parity.controller-issues #query_form fieldset legend {
  color: #17458d;
  font-size: 14px;
  padding: 0 10px 0 0;
}

body.nbx-nubexx-parity.controller-issues #query_form select {
  min-width: 300px;
  height: 28px;
  border: 1px solid #c8d0d4;
  border-radius: 3px;
  background-color: #fff;
}

body.nbx-nubexx-parity.controller-issues #query_form #operators select {
  min-width: 120px;
}

body.nbx-nubexx-parity.controller-issues #query_form .buttons {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 14px;
}

body.nbx-nubexx-parity.controller-issues #query_form .buttons a,
body.nbx-nubexx-parity.controller-issues #query_form .buttons input[type="submit"] {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #eee;
  color: #202124;
  font-size: 14px;
  line-height: 16px;
  text-decoration: none;
  box-sizing: border-box;
}

body.nbx-nubexx-parity.controller-issues table.issues td.id a {
  display: inline-block;
  min-width: 44px;
  padding: 3px 6px;
  border-radius: 3px;
  background: #0b9bd3;
  color: #fff !important;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

body.nbx-nubexx-parity.controller-issues table.issues td.id a::before {
  content: "#";
}

body.nbx-nubexx-parity.controller-issues table.issues td.status {
  color: transparent;
  font-size: 0;
}

body.nbx-nubexx-parity.controller-issues table.issues tr.status-1 td.status::before,
body.nbx-nubexx-parity.controller-issues table.issues tr.status-10 td.status::before,
body.nbx-nubexx-parity.controller-issues table.issues tr.status-12 td.status::before {
  display: inline-block;
  min-width: 38px;
  padding: 3px 7px;
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  text-transform: uppercase;
}

body.nbx-nubexx-parity.controller-issues table.issues tr.status-1 td.status::before {
  content: "NEW";
  background: #8190c4;
}

body.nbx-nubexx-parity.controller-issues table.issues tr.status-10 td.status::before {
  content: "IN PROCESS";
  background: #079bd3;
}

body.nbx-nubexx-parity.controller-issues table.issues tr.status-12 td.status::before {
  content: "DONE";
  background: #087a16;
}

body.nbx-nubexx-parity.controller-issues table.issues td.priority {
  color: transparent;
  font-size: 0;
  text-align: center;
}

body.nbx-nubexx-parity.controller-issues table.issues td.priority::before {
  content: "\2192";
  color: #1aa52d;
  font-size: 20px;
  font-weight: 700;
  line-height: 18px;
}

body.nbx-nubexx-parity.controller-issues.action-show #content > .contextual {
  float: right;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px 18px;
}

body.nbx-nubexx-parity.controller-issues.action-show #content > .contextual a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid #d2d7da;
  border-radius: 4px;
  background: #f3f3f3;
  color: #202124;
  font-size: 14px;
  line-height: 16px;
  text-decoration: none;
  box-sizing: border-box;
}

body.nbx-nubexx-parity.controller-issues.action-show #content > .contextual a:hover {
  background: #e9eef0;
  text-decoration: none;
}

body.nbx-nubexx-parity.controller-issues.action-show .issue {
  clear: both;
  border: 0;
  background: transparent;
}

body.nbx-nubexx-parity.controller-issues.action-show .issue .attributes {
  max-width: 560px;
}

body.nbx-nubexx-parity.controller-issues.action-show .issue .attributes .attribute {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  min-height: 28px;
}

body.nbx-nubexx-parity.controller-issues.action-show .issue .attributes .attribute .label {
  width: auto;
}

body.nbx-nubexx-parity.controller-issues.action-show .issue .attributes .attribute .value {
  width: auto;
  margin-left: 0;
}

body.nbx-nubexx-parity.controller-issues.action-show .issue .attributes .status .value {
  display: inline-block;
  justify-self: start;
  width: auto;
  min-width: 38px;
  max-width: max-content;
  padding: 3px 7px;
  border-radius: 3px;
  background: #8190c4;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  text-transform: uppercase;
}

body.nbx-nubexx-parity.controller-issues.action-show .issue .attributes .priority .value {
  color: transparent;
  font-size: 0;
}

body.nbx-nubexx-parity.controller-issues.action-show .issue .attributes .priority .value::before {
  content: "\2192 Normal";
  color: #1aa52d;
  font-size: 14px;
  font-weight: 600;
}

body.nbx-nubexx-parity.controller-issues.action-show .issue .percent {
  display: inline-block;
  min-width: 80px;
  height: 20px;
  border-radius: 3px;
  background: #ddd;
  color: #17458d;
  font-size: 11px;
  line-height: 20px;
  text-align: center;
}

body.nbx-nubexx-parity.controller-welcome .block-issuequery table.list td.project,
body.nbx-nubexx-parity.controller-welcome .block-issuequery table.list th.project {
  width: 112px;
  max-width: 112px;
}

body.nbx-nubexx-parity.controller-welcome .block-issuequery table.list td.project a {
  display: inline-block;
  max-width: 104px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

body.nbx-nubexx-parity.controller-welcome .block-issuequery table.list td.subject a {
  display: inline-block;
  max-width: 185px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

body.nbx-nubexx-parity.controller-welcome .block-issuequery table.list td.subject {
  overflow: hidden;
  white-space: nowrap;
}

body.nbx-nubexx-parity.controller-welcome .block-issuequery table.list {
  table-layout: fixed;
  width: 100%;
}

body.nbx-nubexx-parity.controller-welcome .block-issuequery table.list th.id,
body.nbx-nubexx-parity.controller-welcome .block-issuequery table.list td.id {
  width: 58px;
}

body.nbx-nubexx-parity.controller-welcome .block-issuequery table.list th.tracker,
body.nbx-nubexx-parity.controller-welcome .block-issuequery table.list td.tracker {
  width: 54px;
}

body.nbx-nubexx-parity.controller-welcome .block-issuequery table.list th.status,
body.nbx-nubexx-parity.controller-welcome .block-issuequery table.list td.status {
  width: 70px;
}

body.nbx-nubexx-parity.controller-welcome .block-issuequery table.list th.priority,
body.nbx-nubexx-parity.controller-welcome .block-issuequery table.list td.priority {
  width: 58px;
}
