.status-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
	gap: 2rem;
	margin-top: 1rem;
}

.status-card {
	background-color: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	box-shadow: 0 4px 8px rgba(0,0,0,0.05);
	padding: 1.5rem;
	transition: box-shadow 0.3s ease-in-out;
}
.status-card:hover {
	box-shadow: 0 6px burdensome rgba(0,0,0,0.1);
}

.status-card h2 {
	margin-top: 0;
	margin-bottom: 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid #0056b3;
	color: #333;
	font-size: 1.5rem;
}

.status-section {
	margin-bottom: 1.5rem;
}

.status-section h3 {
	font-size: 1.1rem;
	color: #555;
	margin-bottom: 0.5rem;
}

.status-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 0;
	border-bottom: 1px solid #f0f0f0;
}
.status-item:last-child {
	border-bottom: none;
}
.status-item-label {
	font-weight: 600;
	color: #444;
}
.status-item-value {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: #666;
	font-family: 'Courier New', Courier, monospace;
}

.status-indicator {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background-color: #cccccc; /* Default: Unknown */
}
.status-ok { background-color: #28a745; } /* Green */
.status-warn { background-color: #ffc107; } /* Yellow */
.status-error { background-color: #dc3545; } /* Red */

.progress-bar-container {
	width: 100%;
	background-color: #e9ecef;
	border-radius: .25rem;
	margin-top: 0.5rem;
}
.progress-bar {
	height: 20px;
	background-color: #007bff;
	border-radius: .25rem;
	text-align: center;
	color: white;
	line-height: 20px;
	font-size: 0.8rem;
	transition: width 0.5s ease-in-out;
}

#ld90-fault-display {
	background-color: #2b3035;
	color: #ff6b68;
	padding: 1rem;
	border-radius: 5px;
	font-family: 'Courier New', Courier, monospace;
	white-space: pre-wrap;
	word-break: break-all;
	max-height: 150px;
	overflow-y: auto;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.control-item label {
    font-weight: bold;
    flex-shrink: 0; /* Prevents the label from shrinking */
}

.control-item input[type="text"] {
    width: 100%;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.control-item input[type="range"] {
    flex-grow: 1; /* Allows the slider to take up available space */
}

.control-btn,
.control-btn-small {
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.control-btn:hover {
    background-color: #0056b3;
}

.control-btn-small {
    padding: 6px 10px;
    font-size: 0.9em;
}

#tm-speed-value {
    width: 45px; /* Fixed width to prevent layout shifts */
    text-align: right;
    font-weight: bold;
}

.control-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    text-align: center;
    font-style: italic;
    transition: all 0.3s;
}

.control-status.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.control-status.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.io-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.io-box {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    background-color: #f9f9f9;
}

.io-box h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 0.9em;
    text-align: center;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.io-group {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.io-label {
    font-weight: bold;
    font-size: 0.85em;
    margin-right: 8px;
    color: #555;
}

.digital-io-container {
    display: grid;
    grid-template-columns: repeat(8, 1fr); /* Creates 8 columns for indicators */
    gap: 5px;
    width: 100%;
}

.io-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%; /* Makes it a circle */
    background-color: #a0a0a0; /* Gray for OFF */
    border: 1px solid #888;
    transition: background-color 0.3s;
}

.io-indicator.on {
    background-color: #28a745; /* Green for ON */
    border-color: #1e7e34;
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.7);
}

.analog-io-container {
    font-size: 0.8em;
    color: #333;
}

.analog-value-item {
    margin-bottom: 4px;
}

.io-no-data {
    color: #888;
    font-style: italic;
    font-size: 0.8em;
}

.node-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
    margin-top: 15px;
}

.node-status-item {
    display: flex;
    align-items: center;
    padding: 8px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.node-status-indicator {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}
.node-status-indicator.online {
    background-color: #28a745;
    box-shadow: 0 0 5px #28a745;
}

.node-status-indicator.offline {
    background-color: #dc3545;
}

.node-name {
    word-break: break-all;
}

#ros-nodes-card {
    grid-column: 1 / -1; /* This makes the element span from the first grid line to the last */
}

.position-group {
    margin-top: 15px;
}

.position-group:first-of-type {
    margin-top: 5px;
}

.position-group h4 {
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #444;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
}

.position-grid {
    display: grid;
    /* Creates 3 columns of equal width */
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 15px; /* Row and column gap */
}