html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, 
.btn-link.nav-link:focus, 
.form-control:focus, .form-check-input:focus,
.btn-close:focus, .btn-close:active:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.btn {
    background-color: #22082C;
    border-color: #22082C;
    color: white;
}

.btn:hover {
    background-color: gray;
    border-color: gray;
}

.btn-close.btn-close-white:hover {
    background-color: gray;
    border-color: gray;
    filter: invert(0) grayscale(0) brightness(200);
}

.btn-super-sm {
    padding: 2px 5px;
    font-size: 9px;
}


.selectedEnvironment {
    color: white;
    background-color: green;
}

a {
    color: #22082C;
}

a:hover {
    color: gray;
}

header {
    position: sticky;
    top: 0px;
    width: 100%;
    /* Keep the header above page content that creates its own stacking layer
       (alerts, sticky table headers, button groups). Bootstrap's sticky-top is 1020;
       offcanvas (1045) and modals (1055) still open above it. */
    z-index: 1030;
}

.navbar {
    background-color: #22082C;
}

.navbar-offscreen {
    position: absolute;
    top: -50px;
}

.navbar-brand {
    color: white
}

.nav-link {
    color: white;
}

.nav-link:hover {
    color: gray;
}

.navbar .btn-link {
    color: white;
}

.navbar-top .navbar-nav .nav-link {
    margin-left: 5px;
}

/* Header links are a mix of <a> and form buttons; give them all the same box so icons and text line up */
.navbar-top .navbar-nav .nav-link {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    white-space: nowrap;
    padding: 0.5rem 0.4rem;
    border: 0;
    line-height: 1.5;
    text-decoration: none;
}

.navbar-top .navbar-nav .nav-link:not(.navbar-brand) {
    font-size: 1rem;
}

.navbar-top .navbar-nav,
.navbar-top .navbar-nav .nav-item,
.navbar-top .navbar-nav form {
    display: flex;
    align-items: center;
    margin: 0;
}

/* the tree view's "ul span" rule below would otherwise pad and stretch these icons */
.navbar-top .navbar-nav .nav-link .bi {
    display: inline;
    padding: 0;
    min-height: 0;
    font-size: 1.05rem;
}

/* a long email address crowds the header on narrower screens; it stays in the tooltip */
.navbar-top .navbar-nav .nav-link .nav-account {
    display: inline-block;
    padding: 0;
    min-height: 0;
    max-width: 20rem;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

@media (max-width: 1399.98px) {
    .navbar-top .navbar-nav .nav-link .nav-account {
        display: none;
    }
}

/* menu button and brand stay side by side even when the other links stack */
.navbar-top .navbar-lead {
    flex-direction: row;
}

/* Below lg the header is one row: menu, brand, and a toggle for the panel that holds the other links */
.navbar-top .header-links-toggler {
    margin: 0 0.5rem 0 auto;
    padding: 0.35rem 0.6rem;
    border: 0;
    border-radius: 0.375rem;
    color: white;
    font-size: 1.5rem;
    line-height: 1;
}

.navbar-top .header-links-toggler:hover,
.navbar-top .header-links-toggler[aria-expanded="true"] {
    background-color: rgba(255, 255, 255, 0.15);
}

@media (max-width: 991.98px) {
    .navbar-top {
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
    }

    .navbar-top .navbar-brand {
        margin-right: 0;
    }

    /* the header is shorter here, so the tool menu starts right under it */
    .navbar-offscreen .offcanvas {
        top: 3.6rem;
    }

    .navbar-top .navbar-collapse {
        margin-top: 0.25rem;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
    }

    .navbar-top .navbar-collapse .navbar-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .navbar-top .navbar-collapse .navbar-nav + .navbar-nav {
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .navbar-top .navbar-collapse .navbar-nav .nav-item,
    .navbar-top .navbar-collapse .navbar-nav form {
        align-items: stretch;
        flex-direction: column;
    }

    .navbar-top .navbar-collapse .navbar-nav .nav-link {
        margin-left: 0;
        padding: 0.65rem 1rem;
        text-align: left;
    }

    .navbar-top .navbar-collapse .navbar-nav .nav-link .bi {
        width: 1.25rem;
        text-align: center;
    }

    /* there is room for the signed-in email in the panel */
    .navbar-top .navbar-collapse .navbar-nav .nav-link .nav-account {
        display: inline-block;
        max-width: calc(100vw - 5rem);
    }
}

.form-check-input:checked {
    background-color: #22082C;
    border-color: #22082C;
    outline-color: #22082C;
}

.nav-pills .nav-link {
    background-color: #22082C;
    border-color: #22082C;
    color: white;
}

.nav-pills .nav-link:hover {
    background-color: gray;
    border-color: gray;
    color: white;
}

.nav-pills .nav-link.active {
    background-color: gray;
    border-color: gray;
    color: white;
}

div.separator {
    position: absolute;
    left: 0px;
    right: 0px;
    border-top: 1px solid lightgray;
}

ul.tree {
    border-top: 1px solid grey;
    min-width: 800px;
    min-height: 100px;
    max-width: 1200px;
    max-height: 550px;
    overflow: auto;
    border: 1px solid;
    margin: 10px;
    padding: 2px;
}

ul.tree, ul.tree ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

ul span {
    display: block;
    padding-left: 25px;
    /*border-bottom: 1px solid #666;*/
    min-height: 25px;
}

ul ul span {
    padding-left: 35px;
    background-position: 15px 8px;
}

ul ul ul span {
    padding-left: 45px;
    background-position: 25px 8px;
}

ul ul ul ul span {
    padding-left: 55px;
    background-position: 35px 8px;
}

ul ul ul ul ul span {
    padding-left: 65px;
    background-position: 45px 8px;
}

ul ul ul ul ul ul span {
    padding-left: 75px;
    background-position: 55px 8px;
}

ul ul ul ul ul ul ul span {
    padding-left: 85px;
    background-position: 65px 8px;
}

ul span a {
    text-decoration: none;
}

ul span a.location::before {
    content: "\F22C";
    display: inline-block;
    font-family: "bootstrap-icons";
    font-size: inherit;
    text-rendering: auto;
}

ul span a.location.collapsed::before {
    content: "\F234";
    display: inline-block;
    font-family: "bootstrap-icons";
    font-size: inherit;
    text-rendering: auto;
}

ul span a.job::before {
    content: "\F309";
    display: inline-block;
    font-family: "bootstrap-icons";
    font-size: inherit;
    text-rendering: auto;
}

.actionbar {
    position:relative;
    display:flex;
    flex-direction: row;
    flex-grow:1 !important;
    align-items:flex-start;
    padding-top:.5rem;
    padding-bottom:.5rem;
    padding-left:0;
    padding-right:0;
    list-style:none;
}

.actioncell {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-grow: 1 !important;
    align-items: flex-start;
    list-style: none;
    padding: 0rem;
}

.PCDMatrix th {
    width: 200px;
    font-weight: bold;
    font-size: 0.7em;
    white-space: pre-line;
    border: 1px dotted;
}

.PCDMatrix tr {
    border: 1px solid;
}

.PCDMatrix td{
    width: 230px;
    font-size: 0.7em;
    border: 1px dotted;
}

.offcanvas {
    top: 60px;
    
}

.offcanvas-header {
    background-color: #22082C;
    color: white;
}
.offcanvas-body {
    background-color: gray;
    border-color: gray;
}

.custom-popover {
    --bs-popover-max-width: 500px;
    --bs-popover-border-color: var(--bd-violet-bg);
    --bs-popover-header-bg: var(--bd-violet-bg);
    --bs-popover-header-color: var(--bs-white);
    --bs-popover-body-padding-x: 1rem;
    --bs-popover-body-padding-y: .5rem;
}

.Permissions {
    min-width: 100px;
    min-height: 100px;
    max-width: 500px;
    max-height: 500px;
    border: 1px solid;
    margin: 10px;
    padding: 2px;
}

.Permissions table {
}

.Permissions th {
    width: 100px;
    font-weight: bold;
    font-size: 1.5em;
    white-space: pre-line;
    border: 1px dotted;
}

.Permissions tr {
    border: 1px solid;
}

.Permissions td {
    width: 100px;
    font-size: 1em;
    border: 1px dotted;
}

.DataPill {
    display: flex;
    text-align: left;
    min-height: 1em;
}

.Header {
    font-weight:bold;
    font-size: 12px;
}

.Header .Label{
    padding: 5px;
    border: 1px dotted;
}

.DataPill .Cell {
    padding: 5px;
    font-size: 10px;
    border: 1px dotted;
}

.DataPill .Name {
    display: inline-flex;
    width: 400px;
    min-height: 1em;
}

.DataPill .Add {
    display: inline-flex;
    width: 75px;
    min-height: 1em;
    text-align: center;
}

.DataPill .Edit {
    display: inline-flex;
    width: 125px;
    min-height: 1em;
    text-align: center;
}

.DataPill .Delete {
    display: inline-flex;
    width: 75px;
    min-height: 1em;
    text-align: center;
}

.DataPill .AccessScope {
    display: inline-flex;
    width: 150px;
    min-height: 1em;
    text-align: center;
}

.DataPill .Count {
    display: inline-flex;
    width: 75px;
    min-height: 1em;
    text-align: center;
}

.Grid {
    min-width: 500px;
    min-height: 100px;
    max-width: 1200px;
    max-height: 600px;
    overflow: auto;
    border: 1px solid;
    margin: 10px;
    padding: 2px;
    display: inline-flex;
}

.Grid.NoOverflow {
    overflow: hidden;
}

.Grid .FAPTree {
    max-height: 600px;
    max-width: 1500px;
}

.Grid table {
    width: 1500px;
}

.Grid thead {

}

.Grid th {
    font-weight: bold;
    font-size: 0.7em;
    border: 1px dotted;
    white-space: nowrap;
}

.Grid tr {
    
}

.Grid td {
    vertical-align: top;
    text-align: left;
    font-size: 0.7em;
    border: 1px dotted;
    padding: 5px;
    white-space: nowrap;
}

.Grid .Fail {
    background-color: red;
    color: white;
    white-space: normal;
}

.Grid .Success {
    background-color: green;
    color: white;
    white-space: normal;
    max-width: 400px;
    height: 50px;
    overflow: auto;
    word-wrap: break-word;
}

.tree {
    padding: 0;
    margin: 0;
    list-style: none;
    max-height: 600px;
    max-width: 1500px;
}

.tree .tbody{
}

.tree td {
    word-wrap: break-word;
    white-space: normal;
    vertical-align: top;
    text-align: left;
    font-size: 0.7em;
    border: 1px dotted;
    padding: 5px;
}

.tree .header {
    position: sticky;
    top: -3px;
    z-index: 1;
    background: white;
    font-weight: bold;
    font-size: 16px;
    border: 1px dotted;
}

.tree .header .title {
    font-size: 24px;
    align-content: center;
    text-align: center;
}

.tree .header .labels {
    padding: 5px;
}

.tree .col-400 {
    width: 400px;
    max-width: 400px;
}

.tree .col-300 {
    width: 300px;
    max-width: 300px;
}

.tree .col-150 {
    width: 150px;
    text-align: center;
}

.tree .col-125 {
    width: 125px;
    text-align: center;
}

.tree .col-85 {
    width: 85px;
    text-align: center;
}

.tree .col-75 {
    width: 75px;
    text-align: center;
}

.tree .col-25 {
    width: 25px;
    text-align: center;
}

.tree .lvl1 {
    display: block;
    padding-left: 25px;
    min-height: 25px;
}

.tree a.lvl1::before {
    content: "\F22C";
    display: inline-block;
    font-family: "bootstrap-icons";
    font-size: inherit;
    text-rendering: auto;
}

.tree a.lvl1.collapsed::before {
    content: "\F234";
    display: inline-block;
    font-family: "bootstrap-icons";
    font-size: inherit;
    text-rendering: auto;
}

.tree .lvl1.collapsed::before {
    content: "\F309";
    display: inline-block;
    font-family: "bootstrap-icons";
    font-size: inherit;
    text-rendering: auto;
}

.tree .lvl2 {
    padding-left: 35px;
    background-position: 15px 8px;
}

.tree a.lvl2::before {
    content: "\F22C";
    display: inline-block;
    font-family: "bootstrap-icons";
    font-size: inherit;
    text-rendering: auto;
}

.tree a.lvl2.collapsed::before {
    content: "\F234";
    display: inline-block;
    font-family: "bootstrap-icons";
    font-size: inherit;
    text-rendering: auto;
}

.tree .lvl2.collapsed::before {
    content: "\F309";
    display: inline-block;
    font-family: "bootstrap-icons";
    font-size: inherit;
    text-rendering: auto;
}

.tree .lvl3 {
    padding-left: 45px;
    background-position: 25px 18px;
}

.tree a.lvl3::before {
    content: "\F22C";
    display: inline-block;
    font-family: "bootstrap-icons";
    font-size: inherit;
    text-rendering: auto;
}

.tree a.lvl3.collapsed::before {
    content: "\F234";
    display: inline-block;
    font-family: "bootstrap-icons";
    font-size: inherit;
    text-rendering: auto;
}

.tree .lvl3.collapsed::before {
    content: "\F309";
    display: inline-block;
    font-family: "bootstrap-icons";
    font-size: inherit;
    text-rendering: auto;
}

.tree .lvl4 {
    padding-left: 55px;
    background-position: 35px 28px;
}

.tree a.lvl4::before {
    content: "\F22C";
    display: inline-block;
    font-family: "bootstrap-icons";
    font-size: inherit;
    text-rendering: auto;
}

.tree a.lvl4.collapsed::before {
    content: "\F234";
    display: inline-block;
    font-family: "bootstrap-icons";
    font-size: inherit;
    text-rendering: auto;
}

.tree .lvl4.collapsed::before {
    content: "\F309";
    display: inline-block;
    font-family: "bootstrap-icons";
    font-size: inherit;
    text-rendering: auto;
}

.pwcsPopOver {
    border-color: #22082C;
}

.pwcsPopOver .popover-body {
    font-size: 9px;
}

.pwcsPopOver .popover-header {
    background-color: #22082C;
    color: white;
    font-size: 14px;

}

.pwcsPopOver .popover-arrow {
    background: #22082C;
}

.security-callout {
    border-color: #22082C33;
    background: linear-gradient(135deg, #f7f2fa 0%, #ffffff 60%);
}

.security-callout-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #22082C;
    color: white;
    font-size: 1.5rem;
}

.security-point {
    display: flex;
    gap: .75rem;
    font-size: .875rem;
    height: 100%;
}

.security-point > .bi {
    color: #198754;
    font-size: 1.25rem;
    line-height: 1.2;
}

.secret-note {
    color: #198754;
}

/* "Beta" next to the product name in the header */
.stage-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.25rem;
    margin-left: 0.5rem;
    /* letter-spacing also follows the last letter, so the right side is that much narrower to keep the word centred */
    padding: 0 calc(0.55rem - 0.08em) 0 0.55rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
    vertical-align: middle;
    position: relative;
    top: -0.1rem;
    color: #22082C;
    background: #f2c94c;
}

/* Loading overlay (js/loading.js): covers the page while a form submits or a link loads */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(34, 8, 44, 0.45);
    backdrop-filter: blur(2px);
    animation: loading-fade-in 0.2s ease-out;
}

.loading-overlay[hidden] {
    display: none;
}

.loading-overlay:focus {
    outline: none;
}

.loading-card {
    width: 100%;
    max-width: 22rem;
    padding: 2rem 1.5rem 1.5rem;
    border-radius: 0.75rem;
    background: white;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.25);
    text-align: center;
}

.loading-ring {
    width: 4.5rem;
    height: 4.5rem;
    margin-bottom: 1rem;
    animation: loading-spin 1.4s linear infinite;
}

.loading-ring circle {
    fill: none;
    stroke-width: 4.5;
}

.loading-ring-track {
    stroke: #ece6ef;
}

.loading-ring-arc {
    stroke: #6f2c91;
    stroke-linecap: round;
    stroke-dasharray: 90 126; /* circumference is about 126 */
    animation: loading-arc 1.4s ease-in-out infinite;
}

.loading-message {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #22082C;
}

.loading-elapsed {
    margin-bottom: 0;
    font-variant-numeric: tabular-nums;
    color: #6c757d;
}

.loading-hint {
    margin: 0.75rem 0 0;
    font-size: 0.875rem;
    color: #6c757d;
}

.loading-dismiss {
    margin-top: 1rem;
}

.btn.loading-dismiss {
    background-color: transparent;
    border-color: #6c757d;
    color: #6c757d;
}

.btn.loading-dismiss:hover {
    background-color: #6c757d;
    color: white;
}

@keyframes loading-spin {
    to { transform: rotate(360deg); }
}

@keyframes loading-arc {
    0% { stroke-dasharray: 10 126; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 80 126; stroke-dashoffset: -20; }
    100% { stroke-dasharray: 10 126; stroke-dashoffset: -116; }
}

@keyframes loading-fade-in {
    from { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .loading-ring, .loading-ring-arc {
        animation-duration: 4s;
    }
}
