﻿:root {
    /*    --nx-fg-blue: #7298ff;
    --nx-bg: #384357 !important;
    --nx-bg-accent: #676980 !important;
    --nx-fg: #e8e8e8 !important;
    --nx-fg-accent: #fff !important;
    --nx-box-shadow: none !important;
    --nx-muted: #9c9fa7 !important;
    --nx-fg-red: #f87070;
    --nx-fg-green: #44ff88;
    --nx-fg-highlight: #bccfff;
    --nx-bg: #31344a;*/
    /*new theme override*/

    --nx-primary-bg: #232431;
    --nx-primary-fg: #dbdbdb;
    --nx-secondary-bg: #181922;
    --nx-secondary-fg: hsl(222.99deg 100% 86.86%);
    --nx-tertiary-bg: #3b3c4d;
    --nx-highlight-bg: #171725;
    --nx-highlight-fg: #88a8ff;
    --nx-positive-bg: #243c2f;
    --nx-positive-fg: #0ecb5d;
    --nx-negative-bg: #633737;
    --nx-negative-fg: #ff4c4c;
    --nx-alert-bg: #382a0a;
    --nx-alert-fg: orange;
    --nx-muted-bg: inherit;
    --nx-muted-fg: #818181;
    --nx-border-color: #000000;
    --nx-space: 10px;
    --nx-space-small: calc(var(--nx-space) * 0.5);
    --nx-margin: 0px var(--nx-space) var(--nx-space) 0px;
    --nx-padding: var(--nx-space) 0px 0px var(--nx-space);
    --nx-border-radius: 5px;
    --nx-border-width: 0.5px;
    --nx-box-shadow: 0px 1px 2px 1px #1b1b1b;
    --nx-main-menu-width: 15rem;
    --nx-dim-bg: #000000d4;
}

.nx-pagelayout-title {
    color: var(--nx-highlight-fg);
    text-transform: uppercase;
}

h1, h2, h3 {
    color: var(--nx-highlight-fg);
}

.nx-dialog-header {
    color: var(--nx-highlight-fg);
}

hr {
    color: black;
    border-style: none;
    height: 3px;
    background: var(--nx-highlight-bg);
}
/*
  Dark theme override requires double allocation — e.g. `.nx-card.nx-card`

  Purpose:
  - Increase selector specificity so this global theme rule can override NexusRazor's
    component-scoped selector (e.g. `.nx-card[b-xxxxx]`) without targeting the generated
    attribute directly.

  Why it works:
  - `.nx-card.nx-card` (two class selectors) has equal specificity to a class+attribute selector.
  - When this stylesheet is loaded after the library CSS, the cascade makes this rule win.

  Debugging tip:
  - Use browser DevTools to inspect the element and confirm which rule and specificity are applied.
*/
strong {
    color: var(--nx-highlight-fg);
}

.card {
    background-color: #384357;
    display: flex;
    flex-direction: column;
    justify-content: start;
    border-radius: 12px;
    border: 1px solid #e2e8f018;
    box-shadow: 0 .46875rem 2.1875rem rgba(31.5, 53, 108, .03), 0 .9375rem 1.40625rem rgba(31.5, 53, 108, .03), 0 .25rem .53125rem rgba(31.5, 53, 108, .05), 0 .125rem .1875rem rgba(31.5, 53, 108, .03);
    padding: 1rem;
    transition: transform 0.2s ease;
    position: relative;
    overflow: hidden;
    color:#fff;
}
.card h2 {
    font-size: 25px;
    font-weight: 600;
    color: #fff;
    margin: 0px;
}
.card h3 {
    font-size: 14px;
    font-weight: 500;
    color: #80858f;
    margin: 0px;
}
.separator {
    border-bottom: 2px solid rgb(0 0 0 / 11%);
    border-radius: 0px;
    margin-top: 5px;
    margin-bottom: 5px;
}


.nx-pagelayout {

    padding-left: 0rem !important;
    padding-right: 0rem !important;
}
.nx-pagelayout-header {

}
.nx-pagelayout-scroll {
    padding-left: 15px !important;
    padding-right: 15px !important;
}





/*Telemetry Devices*/
.container-card {
    background-color: #384357;
    display: flex;
    flex-direction: column;
    justify-content: start;
    border-radius: 12px;
    border: 1px solid #e2e8f018;
    box-shadow: 0 .46875rem 2.1875rem rgba(31.5, 53, 108, .03), 0 .9375rem 1.40625rem rgba(31.5, 53, 108, .03), 0 .25rem .53125rem rgba(31.5, 53, 108, .05), 0 .125rem .1875rem rgba(31.5, 53, 108, .03);
    padding:15px;
    transition: transform 0.2s ease;
    position: relative;
    overflow: hidden;
}
.container-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    width: 100%;
    padding-bottom:10px;
    border-bottom: 2px solid #ffffff20;
}
.container-card h3 {
    color: #fff;
    margin:0px;
}

/*table nx-table*/
.nx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: #e0e0e0;
    background-color: #384357;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.nx-table thead {
    background-color: #1a1a1a;
    color: #ffffff;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.8px;
}
.nx-table thead th {
    background: #384357;
}
.nx-table th,
.nx-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #e2e8f018;
}
.nx-table tbody tr {
    transition: background-color 0.2s ease;
}
.nx-table tbody tr:last-child {
    border-bottom: none;
}

/* Negative values in red, positive in green */
.nx-table td:nth-child(3) {
    font-weight: 600;
    text-align: right;
}
.nx-table td:nth-child(3):before {

    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}
.nx-table tr td:nth-child(3):contains("-") {
    color: #ff4444;
}
.nx-table tr td:nth-child(3):contains("-"):before {
    background-color: #ff4444;
}
/* For positive values (if any in future) */
.nx-table tr td:nth-child(3):not(:contains("-")) {
    color: #44ff88;
}
.nx-table tr td:nth-child(3):not(:contains("-")):before {
    background-color: #44ff88;
}

select.nx-select {
    background-color: #3d4059;
    color: #fff;
    border: 0px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #e2e8f018 !important;
}
.nx-select {
    width:100%;
    min-height:35px;
}
.editor.nx-input {
    width: 100%;
    min-height: 35px;

}





.widget-container {
    background-color: #384357;
    display: flex;
    flex-direction: column;
    justify-content: start;
    border-radius: 12px;
    border: 1px solid #e2e8f018;
    box-shadow: 0 .46875rem 2.1875rem rgba(31.5, 53, 108, .03), 0 .9375rem 1.40625rem rgba(31.5, 53, 108, .03), 0 .25rem .53125rem rgba(31.5, 53, 108, .05), 0 .125rem .1875rem rgba(31.5, 53, 108, .03);
    padding: var(--nx-space-small);
    transition: transform 0.2s ease;
    position: relative;
    overflow-x: auto; /* scroll horizontally when space is insufficient */
    overflow-y: hidden;
    border-radius: 0.5rem;
    grid-column: -1 / 1;
}

.widget-container table {
    width: 100%;
    table-layout: auto; /* let columns size naturally to respect min-width content */
    border-collapse: collapse;
}

.widget-container table .col-stretch {
    width: 300px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .widget-container table .col-period {
        white-space: nowrap;
        color: var(--nx-highlight-fg);
        text-align: right;
    }

.widget-container table td {
    vertical-align: middle;
    white-space: nowrap;
}

.widget-container table th {
    vertical-align: middle;
    white-space: nowrap;
    background: inherit;
}

/* Column holding a flow bar — guarantee enough room for the bar's min-width */
.widget-container table .col-flowbar {
    min-width: 150px;
    width: auto;
    overflow: visible;
}

/* Calculation widget column sizing */
.widget-container table .col-label {
    max-width: 160px;
    width: 0;               /* shrink to content */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-container table .col-value {
    width: 0;               /* shrink to content */
    white-space: nowrap;
}

/* .col-info already exists — ensure it stretches */
.widget-container .col-info {
    width: auto;
    color: var(--nx-muted-fg);
}