/* Interface-local styles for admin/interfaces/devices/style.css */

.pull-right {
    float: right;
}

.device-telemetry-summary {
    border: 1px solid rgba(13, 110, 253, 0.12);
}

.device-telemetry-table-wrapper {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
}

.device-telemetry-table {
    margin-bottom: 0;
}

.device-telemetry-table th,
.device-telemetry-table td {
    vertical-align: top;
}

.device-telemetry-table td .ui-status-badge {
    margin-bottom: 0.35rem;
}

.device-actions-table-wrapper {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
}

.device-actions-table {
    margin-bottom: 0;
}

.device-actions-table th,
.device-actions-table td {
    vertical-align: top;
}

.device-actions-table__group th {
    background: rgba(13, 110, 253, 0.06);
    color: #495057;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.device-actions-table__name {
    min-width: 220px;
}

.device-actions-table__description {
    min-width: 340px;
    color: #5c6770;
}

.device-actions-toolbar {
    max-width: 420px;
}

.device-spec-inventory-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.device-spec-inventory-item {
    line-height: 1.35;
}

.device-spec-inventory-item.is-disconnected {
    color: #6c757d;
}

.device-spec-inventory-item__title {
    font-weight: 500;
}

.device-editable-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: inherit;
    text-decoration: none;
}

.device-editable-trigger:hover {
    color: inherit;
}

.device-editable-trigger__icon {
    opacity: 0.45;
    font-size: 0.9em;
}

.device-details-title-edit {
    opacity: 0;
    margin-left: 0.45rem;
    transition: opacity 0.15s ease;
}

.modal-header:hover .device-details-title-edit,
.device-details-title-edit:focus-visible {
    opacity: 0.45;
}

.device-network-summary-links {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.device-network-summary-link,
.device-network-summary-link:hover {
    color: inherit;
    text-decoration: underline;
}

.device-spec-inventory-item__meta {
    color: #6c757d;
    font-size: 0.92em;
}

.device-spec-inventory-size {
    font-weight: 400;
}

.device-bandwidth-toolbar {
    row-gap: 0.75rem;
}

.device-bandwidth-table-wrapper {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.85rem;
    overflow-x: hidden;
    overflow-y: auto;
    background: #fff;
    position: relative;
}

.device-bandwidth-table {
    margin-bottom: 0;
    min-width: 960px;
    table-layout: fixed;
}

.device-bandwidth-table th,
.device-bandwidth-table td {
    white-space: nowrap;
    vertical-align: middle;
}

.device-bandwidth-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8f9fb;
}

.device-bandwidth-table__application,
.device-bandwidth-table__total {
    position: sticky;
    left: 0;
    z-index: 4;
    background: #ffffff;
    background-clip: padding-box;
}

.device-bandwidth-table__total {
    min-width: 90px;
    text-align: right;
    font-weight: 600;
    position: static;
}

.device-bandwidth-table__application {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.device-bandwidth-table-wrapper tbody th:first-child {
    background: #fff;
    box-shadow: -1px 0 0 rgba(0, 0, 0, 0.1) inset;
}

.device-bandwidth-table thead .device-bandwidth-table__application,
.device-bandwidth-table thead .device-bandwidth-table__total {
    z-index: 6;
    background: #f8f9fb;
}

.device-bandwidth-table-wrapper thead th:first-child {
    background: #f8f9fb;
    box-shadow: -1px 0 0 rgba(0, 0, 0, 0.1) inset;
}

.device-bandwidth-table__bucket {
    text-align: center;
    min-width: 120px;
}

.device-bandwidth-table__cell {
    min-width: 120px;
    font-size: 0.74rem;
    line-height: 1.25;
    text-align: center;
    overflow: hidden;
}

.device-bandwidth-cell__metric {
    display: inline-block;
    white-space: nowrap;
    font-size: 0.74rem;
}

.device-bandwidth-app__label {
    display: block;
    width: 100%;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.device-bandwidth-app__path {
    font-size: 0.78rem;
    color: #6c757d;
    overflow: hidden;
    text-overflow: ellipsis;
}

.device-bandwidth-scrollbar {
    display: none;
    position: sticky;
    bottom: -17px;
    z-index: 5;
    overflow-x: auto;
    overflow-y: hidden;
    height: 16px;
    margin-top: 0;
    border-radius: 999px;
    background: rgba(248, 249, 251, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.device-bandwidth-scrollbar.is-visible {
    display: block;
}

.device-bandwidth-scrollbar__inner {
    height: 1px;
}

span.prefix,
span.suffix {
    font-size: 80%;
    opacity: 0.7;
}

.device-details-performance-stats-table th:not(:first-child),
.device-details-performance-stats-table td:not(:first-child) {
    text-align: right;
}

.device-usage-heatmap .device-performance-heatmap__legend-swatch {
    background: #f8f9fb;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.device-usage-heatmap .device-performance-heatmap__legend-swatch.is-idle {
    background: #d1d5db;
    box-shadow: none;
}

.device-usage-heatmap__legend-swatch {
    background: linear-gradient(90deg, hsl(145, 62%, 78%), hsl(145, 62%, 50%)) !important;
    box-shadow: none !important;
}

.device-usage-heatmap__slot {
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.35);
}

.device-performance-heatmap__legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.device-performance-heatmap__legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: 0.35rem;
    vertical-align: -2px;
}

.device-performance-heatmap__legend-swatch.is-idle {
    background: #d1d5db;
}

.device-performance-heatmap__legend-swatch.is-low {
    background: linear-gradient(90deg, hsl(120, 78%, 42%), hsl(32, 86%, 52%));
}

.device-performance-heatmap__legend-swatch.is-high {
    background: linear-gradient(90deg, hsl(0, 78%, 50%), hsl(0, 78%, 32%));
}

.device-performance-heatmap {
    --device-performance-heatmap-label-width: 132px;
    --device-performance-heatmap-row-gap: 0.75rem;
}

.device-performance-heatmap__hours {
    position: relative;
    height: 18px;
    margin-left: calc(var(--device-performance-heatmap-label-width) + var(--device-performance-heatmap-row-gap));
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.device-performance-heatmap__hour {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-size: 0.72rem;
    color: #6b7280;
    white-space: nowrap;
}

.device-performance-heatmap__row {
    display: flex;
    align-items: center;
    gap: var(--device-performance-heatmap-row-gap);
    margin-bottom: 0.3rem;
}

.device-performance-heatmap__label {
    width: var(--device-performance-heatmap-label-width);
    flex: 0 0 var(--device-performance-heatmap-label-width);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 0.15rem;
    font-size: 0.8rem;
    color: #475569;
    text-align: right;
    white-space: nowrap;
}

.device-performance-heatmap__track {
    position: relative;
    flex: 1 1 auto;
    height: 18px;
    min-width: 720px;
    background: #f8f9fb;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.device-performance-heatmap__slot {
    position: absolute;
    top: 0;
    bottom: 0;
    min-width: 1px;
}

#dds-health-detail-panels.d-none {
    display: none !important;
}

.device-health-modal-host > .col-12 {
    width: 100%;
}

@media (min-width: 992px) {
    .device-details-sidebar > .col-lg-3 {
        width: min(220px, 100%);
        max-width: 220px;
        flex: 0 0 220px;
    }

    .device-details-sidebar > .col-lg-9 {
        width: calc(100% - 220px);
        max-width: calc(100% - 220px);
        flex: 0 0 calc(100% - 220px);
    }
}
