/**
 * This file contains CSS tweaks required for the cloud portal.
 */
:root {
    --bs-gray-300-rgb: 237,237,237;
}


/* These rules make stacked modals sit nicely */
.modal-backdrop.show ~ .modal-backdrop.show { z-index: 1080; }
.modal.show ~ .modal.show { z-index: 2000; }
.modal-backdrop.show ~ .modal-backdrop.show ~ .modal-backdrop.show { z-index: 2080; }
.modal.show ~ .modal.show ~ .modal.show { z-index: 3000; }


/**
 * These rules tweak the react-select styles to work better as a Bootstrap form control
 */
/* Remove the padding that form-control applies (let react-bootstrap do it instead) */
.react-select__wrapper { padding: 0 !important; }
/* Propogate the border-radius property to the react-select control to avoid clipping */
.react-select__wrapper > div, .react-select__control { border-radius: inherit !important; }
/* Remove the border and box shadow from the control as form-control also sets them */
.react-select__control { border: none !important; box-shadow: none !important; }
/* Make sure the menus appear above most things */
.react-select__menu { z-index: 999 !important; }


/* If styling a button as a link, make it look like a link */
.btn-link { padding: 0 !important; }
.btn-link:focus { box-shadow: none !important; }


/**
 * Styles for rendering pre elements in a modal.
 */
.modal pre {
    background-color: var(--bs-dark);
    color: var(--bs-light);
    padding: 1rem;
    max-height: 400px;
    overflow: scroll;
}


/* Make the popovers wide enough for large flavor names */
.popover {
    max-width: 400px;
}


/* Allow an overlay trigger to have the correct cursor */
.overlay-trigger {
    cursor: pointer;
}


/* Remove the focus styles for external links */
.nav-tabs .nav-link[target="_blank"]:focus {
    border-color: transparent !important;
}


/* Make progress bars look nice */
.progress {
    height: auto;
    font-size: 0.85rem;
}
.progress-bar {
    padding: 0.25rem 1rem;
}


/**
 * Styles for the splash page images.
 */
.splash-images {
    text-align: center;
}
.splash-images img {
    object-fit: contain;
    max-height: 140px;
    max-width: 200px;
    padding: 1rem;
    margin: 0 0.5rem 0.5rem;
}


/**
 * Styles for the sidebar navs.
 */
.sidebar-container {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    width: calc(4.5em + 2px);
    padding-left: 0;
    padding-right: 0;
}
.sidebar {
    position: relative;
    z-index: 1000; /* Above selects, but below modals */
    height: 100%;
    width: calc(4.5em + 2px);
    background-color: rgba(var(--bs-light-rgb), 0.9);
    border-right: 1px solid var(--bs-gray-300);
    border-width: 2px;
    transition: width .3s ease-in-out .15s;
    padding-left: calc(var(--bs-gutter-x) * .5);
    padding-right: calc(var(--bs-gutter-x) * .5);
    overflow: hidden;
}
.sidebar-container + * {
    overflow: hidden; /* Required on Windows for some reason */
    padding-top: 1rem;
    padding-bottom: 1rem;
    width: calc(100vw - 4.5em - 2px);
}
.sidebar-nav {
    flex-direction: column;
    padding: .75rem 0;
}
.sidebar-nav .nav-item {
    margin-bottom: .25rem;
    overflow: hidden;
}
.sidebar-nav .nav-item:last-child {
    margin-bottom: 0;
}
.sidebar-nav .nav-link {
    padding: .75rem;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar-nav .nav-link:not(.active):hover {
    background-color: rgba(var(--bs-gray-300-rgb), 0.7);
}
.sidebar-nav .nav-link-text {
    margin-left: -9999999px;
    transition: margin-left 0s step-end .15s;
}
.sidebar-nav .svg-inline--fa {
    font-size: 1.2em;
    vertical-align: -0.175em;
    transition: margin-right 0s step-end .15s;
}
.sidebar-nav .nav-link.nav-toggle {
    display: flex;
    align-items: center;
}
.sidebar-nav .nav-link.nav-link.nav-toggle .nav-link-text {
    flex-grow: 1;
}
.sidebar-nav .nav-link.nav-toggle::after {
    opacity: 0;
    content: "";
    border-right: 0.3em solid transparent;
    border-left: 0.3em solid transparent;
    transition: opacity 0s step-end .15s;
}
.sidebar-nav .nav-link.nav-toggle.toggle-show::after {
    border-top: 0.3em solid;
    border-bottom: 0;
}
.sidebar-nav .nav-link.nav-toggle.toggle-hide::after {
    border-top: 0;
    border-bottom: 0.3em solid;
}
@media (max-width: 1799px) {
    .sidebar:hover, .sidebar.expanded {
        width: 280px;
    }
    .sidebar:hover .sidebar-nav .nav-link-text,
    .sidebar.expanded .sidebar-nav .nav-link-text {
        margin-left: 0;
    }
    .sidebar:hover .sidebar-nav .svg-inline--fa,
    .sidebar.expanded .sidebar-nav .svg-inline--fa {
        margin-right: 1rem;
    }
    .sidebar:hover .sidebar-nav .nav-link.nav-toggle::after,
    .sidebar.expanded .sidebar-nav .nav-link.nav-toggle::after {
        opacity: 1;
    }
    .sidebar:hover .sidebar-nav .nav-item-nested .nav-link-text,
    .sidebar.expanded .sidebar-nav .nav-item-nested .nav-link-text {
        margin-left: 1rem;
    }
}
@media (min-width: 1800px) {
    .sidebar-container, .sidebar {
        width: 280px;
    }
    .sidebar-container + * {
        width: calc(100vw - 280px);
    }
    .sidebar-nav .nav-link-text {
        margin-left: 0;
    }
    .sidebar-nav .svg-inline--fa {
        margin-right: 1rem;
    }
    .sidebar-nav .nav-link.nav-toggle::after {
        opacity: 1;
    }
    .sidebar-nav .nav-item-nested .nav-link-text {
        margin-left: 1rem;
    }
}


/**
 * Styles for the notifications container.
 */
.notifications-container {
    position: fixed;
    top: 0;
    right: 0;
    min-width: 350px;
    z-index: 9999; /* This means notifications will appear above modals */
    margin: 1rem;
}
.notifications-container .toast {
    border-width: 3px;
    margin-bottom: 1rem;
}
.notifications-container .toast:last-child {
    margin-bottom: 0;
}
.notifications-container .toast-body {
    max-height: 200px;
    overflow: scroll;
}


/**
 * Adjustments to tables containing resource representations.
 */
.resource-table th {
    vertical-align: bottom;
}
.resource-table td {
    vertical-align: middle;
    white-space: nowrap;
}
/* The last column of a resource table is always an actions column
   which should shrink to fit the content */
.resource-table tr > td:last-child {
    width: 1%;
}


/**
 * Adjustments for tables that show details as [name, value] pairs.
 */
.details-table {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}
.details-table > :not(caption) > * > * {
    padding: 0.5rem 1rem;
    white-space: nowrap;
    vertical-align: middle;
}
.details-table > * > * > *:first-child {
    width: 40%;
    text-align: right;
}


/**
 * Custom styles for the IDP panel.
 */
.idp-card {
    max-width: 1200px;
}


/**
 * Custom styles for platform and platform type selection cards.
 */
.platform-type-select-card {
    height: 100%;
}
.platform-card-wrapper, .platform-type-select-card-wrapper {
    flex: 0 0 auto;
    width: 100%;
}
@media (min-width: 576px) {
    .platform-card-wrapper {
        width: 350px;
    }
    .platform-type-select-card-wrapper {
        width: 270px;
    }
}
.platform-card.platform-expiring {
    border: 3px solid var(--bs-warning);
}
.platform-card.platform-patch-needed {
    border: 3px solid var(--bs-danger);
}
.platform-card > .card-header {
    display: flex;
    align-items: stretch;
}
.platform-card.platform-expiring > .card-header {
    background-color: rgba(var(--bs-warning-rgb), 0.1);
    border-bottom-color: var(--bs-warning)
}
.platform-card.platform-patch-needed > .card-header {
    background-color: rgba(var(--bs-danger-rgb), 0.1);
    border-bottom-color: var(--bs-danger)
}
.platform-card > .card-header > .icons {
    flex: 1 0 auto;
    vertical-align: middle;
    color: var(--bs-gray-600);
}
.platform-card > .card-header .icon-expiring {
    color: var(--bs-warning);
}
.platform-card > .card-header .icon-patch-available {
    color: var(--bs-danger);
}
.platform-card > .card-header > .status {
    flex: 0 1 auto;
    vertical-align: middle;
}
.platform-card > img, .platform-type-select-card > img {
    padding: 0.5rem 1rem;
    max-height: 120px;
    object-fit: contain;
}
.platform-card > .card-body,
.platform-type-select-card > .card-body {
    padding: 0.5rem 1rem;
}
.platform-card > .card-body:not(:first-child),
.platform-type-select-card > .card-body:not(:first-child) {
    border-top: 1px solid var(--bs-gray-300) !important;
}
.platform-card > .list-group + .card-body,
.platform-type-select-card > .list-group + .card-body {
    border-top: none !important;
}
.platform-card .card-body > :last-child,
.platform-type-select-card .card-body > :last-child {
    margin-bottom: 0;
}
.platform-card .card-subtitle, .platform-type-select-card .card-subtitle {
    color: var(--bs-gray-600) !important;
}
.platform-card .card-footer {
    text-align: right;
}
.create-platform-card {
    max-width: 600px;
}


/**
 * Custom styles for the platform type card.
 */
.platform-type-card {
    margin-bottom: 1rem;
}
.platform-type-card .row {
    align-items: center;
}
.platform-type-card img {
    object-fit: contain;
    height: 80px;
}
.platform-type-card .col > :last-child {
    margin-bottom: 0;
}
.platform-type-card .card-title {
    border-bottom: 1px solid var(--bs-gray-300) !important;
}


/**
 * Custom styles for quota cards.
 */
.quota-card-wrapper {
    flex: 0 0 auto;
    width: 100%;
}
@media (min-width: 576px) {
    .quota-card-wrapper {
        width: 250px;
    }
}
.CircularProgressbar-text {
    fill: var(--bs-body-color) !important;
}
.quota-no-limit .CircularProgressbar-text {
    font-size: 14px !important;
    opacity: 0.4;
}


/**
 * Custom styles for service list group items.
 */
.service-list-group-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0;
    cursor: pointer;
}
.service-list-group-item:hover {
    background-color: var(--bs-gray-300);
}
.service-list-group-item-icon {
    padding-left: 1rem;
    padding-right: 0.375rem;
}
.service-list-group-item-label {
    padding-left: 0.375rem;
    padding-right: 1rem;
}
.service-list-group-item-icon > img {
    height: 1.75rem;
    width: auto;
}
.service-list-group-item-label {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
}
.service-list-group-item .btn-group {
    width: 0;
    overflow: hidden;
    transition: width .3s ease-in-out .2s;
}
.service-list-group-item:hover .btn-group,
.service-list-group-item:focus .btn-group {
    /* This is the width of two buttons, minus the squashed border */
    width: calc(2 * (1.25em + 2 * 0.75rem + 2px) - 1px);
}
.service-list-group-item .btn {
    padding: 0.625rem 0.75rem;
    border-top: 0;
    border-bottom: 0;
}


/**
 * Custom styles for collapsible cards.
 */
.collapsible-card .card-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.collapsible-card .card-header:hover {
    background-color: rgba(0, 0, 0, .07);
}
.collapsible-card .card-header::after {
    content: "";
    border-right: 0.3em solid transparent;
    border-left: 0.3em solid transparent;
}
.collapsible-card .card-header.toggle-show::after {
    border-top: 0.3em solid;
    border-bottom: 0;
}
.collapsible-card .card-header.toggle-hide::after {
    border-top: 0;
    border-bottom: 0.3em solid;
}


/**
 * Custom styles for the scheduling progress bars.
 */
.scheduling-projected-quota .progress-bar {
    padding: 0.5rem 0;
}


/**
 * Styles for the sticky footer.
 */
.sticky-footer-wrap {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.sticky-footer-content {
    flex: 1;
}
.sticky-footer {
    background-color: rgba(var(--bs-light-rgb),var(--bs-bg-opacity));
    padding: 1rem 2rem;
    border-top: 2px solid var(--bs-gray-300);
    text-align: right;
}
.sticky-footer img {
    height: 2.5rem;
}
