:root {
    --metric-border: #e5e5e5;
}

.metric-panel {
    padding: 1rem;
    border: 1px solid var(--metric-border);
    border-radius: 0.5rem;
    background-color: white;
    box-shadow: 0 0.2rem 0 rgba(0,0,0,0.05);
    position: relative;
    min-width: 32%;
    height: 23.75rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.metric-panel-busy {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0.5rem 0 #4e6e9c7a;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.625rem;
    gap: 1rem;
    width: 100%;
}

.metric-title {
    font-size: 1rem;
    font-weight: 500;
    color: black;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    min-width: 0;
}

.metric-title-time {
    font-size: 0.8rem;
    color: #6d737a;
}

.metric-table-container {
    overflow: hidden;
    height: 100%;
}

.metric-table-container .grid-root {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-scrollbar-color) var(--th-background);
height: calc(100% - var(--scroll-pager-height));
}

.metric-table-container .main-table {
    overflow: hidden !important;
    border: none !important;
}

.metric-table-container::-webkit-scrollbar {
    width: 5px;
    height: 5px;
    background-color: var(--th-background);
}

.metric-table-container::-webkit-scrollbar-thumb {
    background: var(--gray-scrollbar-color);
    border-radius: 5px;
}

.metric-table th,
.metric-table td {
    text-align: left;
    justify-content: space-between;
    padding: 0.75rem 1rem !important;
    white-space: nowrap;
}

.metric-table th {
    position: sticky;
    top: 0;
    z-index: 9;
}

.metric-table td div {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: center;
}

.metric-table {
    border: unset !important;
    box-shadow: unset !important;
    height: 100%;
    position: relative;
    border-collapse: collapse !important;
    overflow: unset !important;
}

.metric-table tbody {
    width: 100%;
    min-height: 100px;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-scrollbar-color) transparent;
}

.metric-content {
    border: 1px var(--selection-gray-background-color) solid;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    height: 95%;
}

.keep-alive-content,
.metric-content * {
    font-family: "National Park", sans-serif !important;
    font-size: 1rem !important;
}

.keep-alive-content {
    padding-top: 1rem;
    height: 100%;
}

.keep-alive-data {
    padding-top: 1rem;
    border-top: 1px solid var(--metric-border);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

.keep-alive-data > div {
    display: flex;
    gap: 0.5rem;
}

.keep-alive-label {
    color: var(--text-gray-color) !important;
}

.keep-alive-canvas {
    height: 90%;
    width: 95%;
    display: flex;
    flex-direction: column-reverse;
    justify-content: center;
    gap: 1rem;
}

.keep-alive-canvas canvas {
    max-height: 95%;
    min-width: 285px;
    max-width: 100%;
}

.metric-header-left-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 80%;
    min-width: 0;
}

.metric-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
}

.metric-value-main {
    font-weight: 500;
    font-size: 0.875rem;
}

.metric-details-overflow {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-value-badge {
    display: inline-block;
    padding: 2px 4px;
    border-radius: 6px;
    font-weight: 600;
    width: max-content;
    text-transform: uppercase;
}

.metric-value-badge-success {
    background-color: var(--success-background-color);
    color: forestgreen;
}

.metric-value-badge-no-data {
    background-color: var(--warn-background-color);
    color: darkorange;
}

.event-status-success {
    color: forestgreen;
    font-weight: bold;
}

.event-status-failed {
    color: indianred;
    font-weight: bold;
}

.dataflow-event-status-success {
    background-color: var(--success-background-color);
    color: forestgreen;
    display: inline-block;
    padding: 2px 4px;
}

.dataflow-event-status-failed {
    background-color: #fff5f5;
    color: indianred;
    display: inline-block;
    padding: 2px 4px;
}

.metric-value-badge-stage-disabled {
    background-color: #ebedf1;
    color: #2c2c24;
}

.metric-value-badge-error {
    background-color: #fff5f5;
    color: indianred;
}

.metric-unit-badge {
    display: inline-block;
    padding: 2px 4px;
    font-size: 0.7rem !important;
    color: white;
    border-radius: 6px;
    font-weight: 600;
    width: min-content;
}

.metric-status-label.up {
    color: green;
    font-weight: bold;
}
.metric-status-label.down {
    color: red;
    font-weight: bold;
}

.metric-inline-row {
    display: flex;
    gap: 0.5em;
    margin: 2px 0;
    align-items: center;
}

.metric-grid-header {
    margin-bottom: 6px;
}

.metric-no-data {
    display: flex;
    align-items: center;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    font-size: 1rem;
    color: grey;
}

.grid-no-data {
    position: absolute;
    margin: -1rem -0.5rem -1rem -1.5rem !important;
}

.metric-100 {
    flex: 0 0 100%;
}

.metric-66 {
    flex: 0 0 calc(66.666% - 0.5rem);
}

.metric-50 {
    flex: 0 0 calc(49.995% - 0.625rem);
}

.metric-33 {
    flex: 0 0 calc(33.333% - 0.75rem);
}

.metric-fake {
    width: 100%;
    height: 100%;
}

.metric-placeholder-grid {
    width: 100%;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px var(--selection-gray-background-color) solid;
    background-color: white;
    height: fit-content;
    overflow: hidden;
}

.metric-placeholder-grid-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 2rem;
    margin-bottom: 2.25rem;
}

.metric-placeholder-grid > * {
    width: 100%;
}

.metric-placeholder-panel {
    border: 1px dashed var(--bs-primary);
    border-radius: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-content: space-around;
    justify-content: center;
    font-size: 1rem;
    color: var(--bs-primary);
    height: 100%;
}

.metric-no-placeholder-panel {
    border: 1px solid var(--selection-gray-background-color);
    border-radius: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-content: space-around;
    justify-content: center;
    font-size: 1rem;
    color: grey;
    height: 100%;
    background-color: var(--light-gray-disabled-color);
}

.metric-no-placeholder-panel > div {
    text-align: center;
}

.metric-placeholder-panel-add-btn {
    font-size: 3rem;
    height: 4.5rem;
    color: var(--bs-primary);
    cursor: help !important;
}

.metric-placeholder-panel-add-btn:first-child:active {
    border-color: transparent;
}

.metric-placeholder-grid > table > tbody {
    display: grid;
    gap: 1rem;
}

.metric-placeholder-grid > table > tbody > tr {
    display: flex;
    gap: 1.25rem;
    justify-content: space-around;
    overflow: hidden;
}

.metric-placeholder-grid > table > tbody > tr > td {
    min-width: 0;
}

.severity-warn-cell-badge > div {
    background-color: var(--warn-background-color) !important;
    color: darkorange;
    padding: 0.25rem 0.6rem;
    text-align: center;
    width: fit-content;
    border-radius: 0.25rem;
}

.severity-error-cell-badge > div {
    background-color: mistyrose !important;
    color: red;
    padding: 0.25rem 0.6rem;
    text-align: center;
    width: fit-content;
    border-radius: 0.25rem;
}

.severity-info-cell-badge > div {
    background-color: honeydew !important;
    color: forestgreen;
    padding: 0.25rem 0.6rem;
    text-align: center;
    width: fit-content;
    border-radius: 0.25rem;
}
