:root {
    --black: rgba(0,0,0,1);
    --white: rgb(255, 255, 255);
    --blue: rgba(1,178,235,1); /* Correct */
    --blue-light: rgba(184,225,249,1); /* Added by pnp */
    --blue-background: rgba(207, 244, 252, 1); /* Added by pnp */
    --blue2: rgba(0, 112, 180, 1); /* Correct */
    --orange: rgba(252, 68, 15, 1); /* Correct */
    --grey: rgba(87, 87, 89, 1); /* Correct */
    --grey2: rgba(231, 232, 233, 1); /* Correct */
    --grey3: rgba(87, 87, 89, 0.5); /* Correct */

    --grey-dark: rgba(87,87,89,1); /* Not quite right, added by pnp */
    --grey-light: rgba(240,242,245,1);
    --grey-text: rgba(112,112,112,1);
    --border-outline: rgba(222,226,230,1);
    --blue-edit: rgb(20, 27, 77);
    --orange-delete: rgb(252, 108, 101);
    --orange-delete-hover: rgb(252, 65, 55);
}

body {
    color: var(--grey-text);
    font-family: Arial, Helvetica, sans-serif;
}

/****** 1 - Navigation ******/
/****************************/
.nav-link {
    font-weight: bold;
}

nav.navbar .right-align {
    display: flex;
    position: absolute;
    right: 25px;
}

nav.navbar .right-align #filter-form {
    min-width: 250px;
}

nav.navbar a.nav-item {
    color: var(--grey-text);
    padding-left: 20px;
    margin-top: 6px;
}

nav.navbar a.nav-item i {
    padding-top: 3px;
    font-size: 20px;
}

nav.navbar a.nav-item img {
    width: 25px;
    border-radius: 50%;
    margin-right: 10px;
}

nav.navbar .nav-item.username {
    min-width: 125px;
}

nav.navbar .nav-item.username img {
    float: left;
    margin-right: 10px;
}

nav.navbar .nav-item.username p {
    margin: 0;
    float: left;
}

.navbar-brand img {
    height: 20px;
    transform: translate(0, -2px);
}

@media (min-width: 1200px) {
    .navbar-expand-xl .navbar-nav .nav-link {
        padding-left: 15px;
        padding-right: 15px;
    }
}

.navbar-light .nav-item.active .nav-link,
.navbar-light .nav-item .nav-link:focus {
    color: var(--grey-text);
}

.navbar-light .nav-item .nav-link:active,
.navbar-light .nav-item:hover .nav-link {
    color: var(--blue);
}

nav.navbar .btn-navbar {
    margin-left: 10px;
}

.btn-navbar .btn {
    border: 0 !important;
}

.btn-navbar .btn img {
    filter: invert(47%) sepia(10%) saturate(1%) hue-rotate(314deg) brightness(89%) contrast(87%);
    height: 1rem;
    padding-left: 10px;
}

.btn:focus, .btn:active {
    outline: none !important;
    box-shadow: none !important;
}

.btn-navbar .dropdown-menu {
    margin-left: -60px;
}

.btn-navbar .dropdown-menu li img {
    height: 1.25rem;
    width: auto;
}

nav.navbar .btn-navbar .dropdown-menu[data-bs-popper] {
    left: unset;
    right: 0;
}

nav.navbar .dropdown-item {
    font-size: 13px;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 270px;
}

nav.navbar .dropdown-item:hover {
    background-color: var(--grey-light);
}

/* Select2 multiple selection styling */
.right-align .select2-container {
    width: auto !important;
}

.select2-container--default .select2-selection--multiple {
    background-color: var(--grey-light);
    border: none !important;
    border-radius: 5px;
    height: 38px;
    padding-right: 35px;
}

.select2-selection--multiple:after {
    content:"";
    position:absolute;
    right:1.25rem;
    top:15px;
    width:0;
    height:0;
    border-left: 0.4rem solid transparent;
    border-right: 0.4rem solid transparent;
    border-top: 0.4rem solid var(--grey-text);
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: inline;
    list-style: none;
    padding: 0;
}

.select2-container .select2-search--inline .select2-search__field {
    width: 100%;
    height: 100%;
}

.select2-results__options {
    background-color: var(--grey-light);
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--blue2);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--blue);
    color: var(--white);
    border: none;
    border-radius: 5px;
    margin-bottom: 6px;
    padding-left: 27px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    background: var(--blue2);
    color: var(--white);
    padding-left: 7px;
    padding-right: 7px;
}

.select2-container--default .select2-results__option--selected {
    background: var(--blue);
    color: var(--white);
}

.select2-container--default .select2-selection--multiple .select2-selection__clear {
  display: none !important;
}

#global-filter {
    width: 100%;
}

.dropdown-menu .dropdown-header {
    font-weight: 600;
}

.dropdown-menu img {
    padding-right: 1em;
    filter: brightness(0) saturate(100%) invert(56%) sepia(36%) saturate(5352%) hue-rotate(160deg) brightness(101%) contrast(99%);
}


/****** 2 - Content ******/
/*************************/
.content {
    background-color: var(--grey-light);
    height: 100%;
    min-height: 100vh;
    padding-top: 85px;
    padding-bottom: 63px;
}

.pageContainer {
    width: 90%;
    margin-left: 5%;
    display: flex;
    flex-direction: column;
}

.container {
    background-color: var(--white);
    border-radius: 5px;
    padding: 20px 25px 63px;
    margin-bottom: 30px;
    border: 1px solid var(--border-outline);
    position: relative;
    overflow: visible;
}

.login-container {
  width: 500px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% - 80px));
  text-align: center;
  padding-left: 5rem;
  padding-right: 5rem;
}

.login-container img {
  max-height: 100px;
  width: auto;
  margin-bottom: 20px;
}

.login-container p {
  margin: 10px 0;
  font-size: 1.25em;
  font-weight: 600;
}

.login-container input {
  margin: 0;
}

.login-container label {
  display: block;
  text-align: start;
  margin-bottom: 0;
  font-size: 15px;
  font-weight: 600;
}

.login-container .formInputs {
  padding: 0;
}

.login-container .btn-save {
  margin: 25px auto auto;
  float: none;
  font-weight: normal;
  font-size: 1em;
}

/* The forgot password link is moved inside this label div by JS */
label[for="id_password"] {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgotPasswordLink {
    margin-left: auto;
}

.forgotPasswordLink a {
    color: var(--blue) !important;
    font-weight: 600;
    text-decoration: underline;
}

.formText {
    padding-top: 2em
}

.tool-category {
    border: 1px solid var(--border-outline);
    border-radius: 5px;
    background-color: var(--white);
    padding: 1.5em;
    padding-top: 0.5em;
    padding-bottom: 0;
    width: 80%;
    min-width: 500px;
    margin: 0 auto;
    margin-bottom: 20px;
}

.tool-selectors {
    display: grid;
    grid-template-columns: repeat(auto-fit, 9em); /* Match the .select-container width */
    gap: 2.5em;
    justify-content: center;
}

.tool-selectors a {
    text-decoration: none;
    color: var(--blue2);
    display: block;
    justify-self: center;
}

.select-container {
    background-color: var(--grey-light);
    border-radius: 5px;
    padding: 1em;
    margin-bottom: 2em;
    border: 1px solid var(--border-outline);
    aspect-ratio: 1 / 1;
    color: var(--blue);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 9em; /* Match the .tool-selectors grid column width */
}

.select-container-title {
    font-weight: 550;
    color: var(--grey);
}

.select-container img {
    height: 4em;
    filter: brightness(0) saturate(100%) invert(56%) sepia(36%) saturate(5352%) hue-rotate(160deg) brightness(101%) contrast(99%);
}

.select-container:hover {
    color: var(--blue-edit);
    border: 2px solid var(--border-outline);
}

a:has(.select-container.coming-soon) {
    cursor: not-allowed;
    pointer-events: none;
}

.select-container.coming-soon {
    position: relative;
    opacity: 0.7;
}

.select-container.coming-soon::after {
    content: "Coming Soon";
    position: absolute;
    top: 0.5em;
    right: 0.5em;
    background: var(--orange, #ff9500);
    color: white;
    font-size: 0.7em;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-weight: 600;
}

.pageContainer h2 {
    font-size: 30px;
    font-weight: 600;
    padding-bottom: 10px;
    margin: 0;
}

.header-export {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.header-export .exportContainer {
    padding-left: 2em;
    padding-bottom: 10px;
}

.container h3 {
    font-size: 20px;
    font-weight: 500;
    margin-top: 30px;
    margin-bottom: 15px;
}

.pageContainer .pageButtons {
    position: absolute;
    right: 5%;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.dashboard-container {
    max-width: none !important;
}

.container:has(.fishbone) {
    padding-bottom: 30px;
}

.fishbone svg a ellipse {
    stroke: rgb(0, 0, 0);
    fill: rgb(255, 164, 0);
    stroke-width: 0px;
    fill-opacity: 0;
}

#item-image-tooltip {
  position: absolute;
  visibility: hidden;
  opacity: 0;
  border: 1px solid #ccc;
  background-color: white;
  padding: 5px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
  z-index: 100;
}

#item-image-tooltip img {
  display: block;
  width: 350px;
  height: auto;
}

#item-image-tooltip.visible {
  visibility: visible;
  opacity: 1;
}

.fishbone svg a rect {
    stroke: none;
    fill: rgb(255, 164, 0);
    fill-opacity: 0;
}

.dashboard-chart {
    width: 70%;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    gap: 40px;
}

.dashboard-chart-canvas-split {
    flex: 1;
    max-width: 48%;
}

.scoring-legend {
    position: absolute;
    top: calc(20px + 1.5rem + 0.5rem);
    right: 1em;
    width: 10%;
    height: max-content;

    background: var(--grey-light);
    padding: 1em;
    border-radius: 5px;
}

.dashboard-no-content-container {
    background-color: var(--blue-background);
    border-radius: 5px;
    padding: 20px 25px 20px;
    margin-bottom: 30px;
    border: 1px solid var(--border-outline);
    position: relative;
    overflow: visible;
}

.dashboard-container form {
    width: 600px;
    position: absolute;
    right: 20px;
    align-items: flex-end;
}

.dashboard-container .formInputs {
    padding-bottom: 0;
    margin-right: 0;
}

.dashboard-container .formInputs.exchangeRates {
    margin-top: 1.5em;
}

.dashboard-container .formInputs.exchangeRates .text-muted {
    font-size: 0.7em;
}

.dashboard-container .formSave {
    margin-top: 1em;
}

.dashboard-container .value {
    max-width: 100%;
    display:block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 6em;
}

/* Import/Export */
.import-exportContainer {
    grid-column: 1;
    grid-row: 1;
    background-color: var(--white);
    border-radius: 5px;
    width: fit-content;
    padding: 20px 25px 20px;
    margin-bottom: 30px;
    border: 1px solid var(--border-outline);
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    grid-template-rows: 1fr;
    align-items: center;
}

.import-exportContainer .exportContainer {
    grid-column: 1;
    grid-row: 1;
}

.import-exportContainer .importContainer {
    grid-column: 2;
    grid-row: 1;
    justify-self: end; /* Aligns to the right of the grid column */
}

.import-exportContainer .importContainer form {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.import-exportContainer .importContainer form input {
    width: auto;
}

.import-exportContainer .importContainer form button {
    margin-left: 20px;

}

.footer {
    position: relative;
    bottom: 0;
    width: 100%;
    background: var(--white);
    color: var(--grey-dark);
    height: 63px;
    line-height: 63px;
    text-align: center;
}


/****** 3 - Forms ******/
/***********************/
.tabs-container {
    background-color: transparent;
    padding: 0px 0px 0px 0px;
    margin-bottom: 0px;
    border: none;
}

.tabs-container .container {
    max-width: none !important;
}

.nav-tabs {
    border: none;
    z-index: 300;
    position: relative;
    top: 1px;
    max-width: 1140px;
}

.tabs-container .nav-link {
    font-weight: 100;
}

.nav-tabs .nav-link {
    color: var(--grey-dark);
}

form {
    display: flex;
    flex-direction: column;
}

form .formInputs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    column-gap: 1.5rem;
    padding-bottom: 2.5rem;
}

form .hiddenFieldset {
    display: none;
}

form .formLeft2 {
    grid-column: 1 / 4;
}

form .formRight2 {
    grid-column: 4 / 7;
}

form .formLeft3 {
    grid-column: 1 / 3;
}

form .formLeft3Topup {
    grid-column: 3 / 4;
}

form .formMiddle3 {
    grid-column: 3 / 5;
}

form .formRight3 {
    grid-column: 5 / 7;
}

form .source label {
    color: var(--grey3);
}

form .source .textinput {
    background-color: var(--grey-light);
    color: var(--grey3);
}

form .formSpan {
    grid-column: 1 / 7;
}

form .half .form-control {
    width: 50%;
}

form label,
.advanced-filters label {
    display: block;
    margin-bottom: 0;
    font-size: 15px;
    font-weight: 600;
}

form input,
form select {
    height: 38px;
    display: block;
    background: var(--grey-light);
    color: var(--grey-text);
    border-radius: 5px;
    padding: 5px 5px 5px 15px;
    border: none;
    width: 100%;
}

form input[type=submit] {
    width: auto;
}

form .helptext {
    text-align: left;
    font-size: 0.75em;
}

form .helptext ul {
    margin-bottom: 0;
    padding-left: 1em;
}

.bottom-btns-group,
.top-btns-group {
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.top-btns-group {
    position: absolute;
    right: 0px;
    top: -70px;

}

.btn-add,
.btn-export,
.btn-save,
.btn-delete,
.btn-back {
    border-radius: 5px;
    outline: none;
    border: none;
    text-decoration: none;
}

.btn-add,
.btn-save {
    background: var(--blue);
    color: var(--white);
    padding: 10px 20px;
    min-width: 150px;
    height: 38px;
    line-height: 0;
    transition: 0.1s;
}

.top-btns-group .btn-delete,
.bottom-btns-group .btn-delete {
    background: var(--orange-delete);
    color: var(--white);
    min-width: 150px;
    height: 38px;
    transition: 0.1s;
    display: inline-block;
    text-align: center;
    vertical-align: middle;
}

.btn-back {
    background: var(--blue-edit);
    color: var(--white);
    min-width: 150px;
    height: 38px;
    transition: 0.1s;
    display: inline-block;
    text-align: center;
    vertical-align: middle;
}

.btn-export {
    background: var(--blue);
    color: var(--black);
    padding: 8px 15px;
    float: left;
    height: 28px;
    line-height: 0;
    transition: 0.1s;
    min-width: initial;
}

.btn-export img {
    height: 0.75em;
}

.btn-save:hover {
    background-color: var(--blue2);
    color: var(--white);
}

.btn-delete:hover {
    background-color: var(--orange-delete-hover);
}

.btn-back:hover {
    color: var(--white);
}

.exportButtonWrapper {
  position: absolute;
  bottom: 10em;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: left;
}

.healthcheckSelector,
.tarSelector {
    position: absolute;
    right: 5%;
    top: 85px;
    display: flex;
    flex-direction: row;
    gap: 1em;
}

.healthcheckSelector .score-setting select {
    color: var(--grey3);
}


/****** 3 - Tables ******/
/************************/
table {
    background-color: var(--white);
}

.btn-col-group {
    display: flex;
    height: 30px;
    margin-left: 20%;
}

table .btn-edit,
table .btn-delete {
    border-radius: 5px;
    outline: none;
    border: none;
    text-decoration: none;
    padding: 3px 15px;
}


table .btn-edit {
    position: relative;
    background: var(--blue-edit);
    color: var(--white);
    z-index: 6;
    display: flex;
    flex-direction: row;
    align-items: center;
}

table .btn-edit:hover {
    text-decoration: none;
    color: var(--white);
    background: var(--blue-edit);
}

.btn-edit img {
    height: 1em;
    padding-left: 7px;
    filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(86deg) brightness(104%) contrast(101%);
}

table .btn-delete {
    display: inline-block;
    position: relative;
    background: var(--orange-delete);
    color: var(--white);
    z-index: 5;
    margin-left: -10px;
    padding-left: 20px;
}

table .btn-delete:hover {
    text-decoration: none;
    background: var(--orange-delete-hover);
}

.btn-delete img {
    height: 1em;
    filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(86deg) brightness(104%) contrast(101%);
}

.page-item.active .page-link {
    background: var(--blue);
    border-color: var(--blue);
}

/* Style the datatables */
table.dataTable td {
    font-size: 0.9em;
}

table.dataTable th,
table.dataTable td {
  padding: 0.4em;
  vertical-align: middle;
}

div.dataTables_wrapper div.dataTables_paginate {
    margin-top: 25px;
    white-space: unset;
    text-align: center;
}

div.dataTables_wrapper div.dataTables_paginate .pagination {
    display: inline-block;
    border-radius: 35px;
}

div.dataTables_wrapper div.dataTables_paginate .paginate_button {
    float: left;
}

div.dataTables_wrapper div.dataTables_paginate .page-item:first-child .page-link {
    border-radius: 15px 0 0 15px;
    border-right: 1px solid rgba(0, 0, 0, 0.25);
}

div.dataTables_wrapper div.dataTables_paginate .page-item .page-link {
    background: #FFFFFF;
    color: var(--grey-text);
    font-weight: bold;
    text-decoration: none;
}

div.dataTables_wrapper div.dataTables_paginate .page-item:last-child .page-link {
    border-radius: 0 15px 15px 0;
}

.paginate_button.active .page-link {
    background-color: var(--blue) !important;
    border-color: var(--blue) !important;
}

div.dataTables_wrapper div.dataTables_paginate .page-item.active .page-link {
    color: var(--white) !important;
}

table.table.table-striped.table-list {
    width:100%;
    margin-top:2em;
}

/* Style the summary tables for HIGA scoring subcategories */
.subCat-summary-table {
    width: 100%;
}

.subCat-summary-table th,
.subCat-summary-table td {
    padding: 5px;
}

.subCat-summary-table thead {
    background-color: var(--blue);
    color: var(--white);
    word-wrap: break-word;
}

.subCat-summary-table td:nth-child(1) {
    font-weight: bold;
}

.subCat-summary-table td:nth-child(2),
.subCat-summary-table th:nth-child(2),
.subCat-summary-table td:nth-child(3),
.subCat-summary-table th:nth-child(3),
.subCat-summary-table td:nth-child(4),
.subCat-summary-table th:nth-child(4),
.subCat-summary-table td:nth-child(8),
.subCat-summary-table th:nth-child(8) {
    text-align: center;
}


/* Filters container */
.filter-container {
    padding: 20px 25px 5px;
    box-sizing: border-box;
    background-color: var(--white);
    border-radius: 5px;
    margin-bottom: 30px;
    border: 1px solid var(--border-outline);
}

.filter-container .filters {

}

.filter-container .input-container {
    margin-bottom: 15px;
}

.filter-container .input-container input {
    width: 100%;
    height: 38px;
    display: block;
    background: var(--grey-light);
    color: var(--grey-text);
    border-radius: 5px;
    padding: 5px 5px 5px 15px;
    border: none;
    outline: none !important;
}

.filter-container .advanced-filters {
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    display: none;
}

.btn-adv-filter {
    color: #707070;
    font-weight: 600;
    line-height: 38px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    width: -moz-fit-content;
    width: fit-content;
}

.btn-clear, #clear-filters {
    background: var(--blue-edit);
    color: #FFFFFF !important;
    border-radius: 5px;
    padding: 20px 20px !important;
    height: 38px;
    outline: none;
    border: none;
    min-width: 150px;
    text-decoration: none;
    cursor: pointer;
}

.btn-clear, #clear-filters {
    height: 38px;
    line-height: 1px;
    transition: 0.1s;
}