/* Simulation Table Styles */
.simulation-card {
    background: white;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
    font-family: Gilroy, sans-serif;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.simulation-card h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 17px;
    font-weight: bold;
    text-align: center;
    flex-shrink: 0;
}

.simulation-table-container {
    overflow-x: auto;
    overflow-y: auto;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    max-width: 100%;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.simulation-table {
    min-width: 400px; /* Further reduced for better fit */
    width: 100%;
    height: 100%;
    border-collapse: collapse;
    font-size: 15px;
    white-space: nowrap; /* Prevent text wrapping */
}

.simulation-table tbody {
    height: 100%;
}

.simulation-table th {
    background-color: #f8f9fa;
    color: #333;
    padding: 4px 3px;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    font-size: 14px;
}

.simulation-table th:last-child {
    border-right: none;
}

.simulation-table td {
    padding: 3px 2px;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    font-size: 14px;
}

.simulation-table td:last-child {
    border-right: none;
}

.simulation-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.simulation-table tbody tr:hover {
    background-color: #e3f2fd;
}

/* Temperature display styles */
.temp-display {
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 4px;
    display: inline-block;
    font-size: 13px;
}

.temp-normal {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.temp-warm {
    background-color: #fff3e0;
    color: #f57c00;
    border: 1px solid #ff9800;
}

.temp-high {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #f44336;
    animation: temp-warning 2s ease-in-out infinite;
}

@keyframes temp-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .simulation-card {
        padding: 6px;
        margin: 5px;
    }

    .simulation-card h3 {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .simulation-table {
        font-size: 10px;
        min-width: 400px; /* More compression for nav-el */
    }

    .simulation-table th {
        padding: 4px 3px;
        font-size: 10px;
    }

    .simulation-table td {
        padding: 3px 2px;
        font-size: 10px;
    }

    .temp-display {
        padding: 1px 3px;
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .simulation-card {
        padding: 4px;
        margin: 3px;
    }

    .simulation-card h3 {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .simulation-table {
        font-size: 9px;
        min-width: 350px; /* Maximum compression for very small screens */
    }

    .temp-display {
        padding: 1px 2px;
        font-size: 8px;
    }
}
