
.result-cell {
    background-color: #eef2ff; /* Light blue background for results */
    border: 1px solid #c7d2fe; /* Matching border */
    border-radius: 0.5rem; /* Slightly less rounded for table cells */
    padding: 0.5rem 1rem; /* Smaller padding for cells */
    color: #4338ca; /* Darker blue text */
    font-weight: 600;
    text-align: center;
    font-size: 0.95rem;
    min-width: 120px; /* Ensure result cell has minimum width */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%; /* Fill the cell height */
}

.error-message {
    color: #ef4444; /* Red for errors */
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: center;
}

.input-group {
    margin-bottom: 1.5rem; /* Spacing between input groups */
}

/* Table specific styles */
.calculation-table {
    width: 100%;
    border-collapse: separate; /* Allows for border-radius on cells */
    border-spacing: 0 0.75rem; /* Space between rows */
    margin-top: 1.5rem;
}

.calculation-table th, .calculation-table td {
    padding: 0.75rem;
    text-align: left;
    vertical-align: middle;
}

.calculation-table th {
    background-color: #f1f5f9; /* Light header background */
    font-weight: 700;
    color: #475569; /* Darker grey for header text */
    border-bottom: 2px solid #e2e8f0;
    position: sticky; /* Sticky header for scrolling table */
    top: 0;
    z-index: 10; /* Ensure header stays on top */
}

.calculation-table tbody tr {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Soft shadow for rows */
    transition: box-shadow 0.2s ease;
}

.calculation-table tbody tr:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Enhanced shadow on row hover */
}

.calculation-table td:first-child { border-top-left-radius: 0.75rem; border-bottom-left-radius: 0.75rem; }
.calculation-table td:last-child { border-top-right-radius: 0.75rem; border-bottom-right-radius: 0.75rem; }

.flex-row-inputs {
    display: flex;
    gap: 0.5rem; /* Space between input and unit select */
}

.flow-input-group {
    display: flex;
    flex-grow: 1; /* Allow the input to take available space */
}

.remove-btn {
    background-color: #ef4444; /* Red for remove button */
    color: white;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
    box-shadow: none; /* No shadow for small buttons */
    width: auto; /* Auto width for smaller button */
    transform: translateY(0); /* Remove lift on hover for small button */
}
.remove-btn:hover {
        background-color: #dc2626; /* Darker red on hover */
        transform: translateY(0); /* Remove lift on hover for small button */
        box-shadow: none;
}

/* Canvas drawing area */
#drawingCanvas {
    border: 1px solid #cbd5e1;
    background-color: #f8fafc;
    border-radius: 0.75rem;
    touch-action: none; /* Disable default touch actions for drawing */
    width: 100%; /* Make canvas responsive width */
    height: 400px; /* Fixed height for visibility */
    display: block; /* Ensure it takes up space */
    cursor: crosshair; /* Indicate drawing mode */
}

/* Highlight drawn pipe when its table row is hovered */
.pipe-section-row.highlighted {
    background-color: #e0f2fe; /* Light blue background */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Style for the pipe number indicator in table */
.pipe-number-indicator {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #6366f1;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Drag-and-drop table row styling */
.calculation-table tbody tr.dragging {
    opacity: 0.5;
    border: 2px dashed #6366f1;
}
.calculation-table tbody tr.drop-target {
    background-color: #c7d2fe; /* Light indigo for drop target */
}

/* Symbol controls styling */

.drawing-controls {
    width: max-content;
    height: fit-content;
    display: inline-flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0rem;
    padding: 0rem;
}

#symbolControls {
    background-color: #28a745;
    padding: 0.5rem;
    height: 1rem;
    border-radius: 5px;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;

    
}
#symbolControls label {
    font-weight: normal;
    color: #ffffff;
    margin-bottom: 0;
    cursor: pointer;
}
#symbolControls input[type="radio"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

/* File input styling */
#fileInput {
    display: none; /* Hide the default file input */
}