/* Body reset and layout */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.container {
  display: flex;
  flex: 1;
  overflow: auto;
  padding: 20px;
}

#report-container {
  width: 100%;
}

/* Overall header styling */
#page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  color: #ecf0f1;
  background-color: #555;
  border-bottom: 1px solid #ccc;
}

#page-header h1 {
  margin: 0;
  font-size: 24px;
}

#refresh-button {
  background-color: transparent;
  border: none;
  border-radius: 5px;
  color: #ecf0f1;
  font-size: 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 5px;
  transition: color 0.3s ease;
}

#refresh-button .material-symbols-outlined {
  font-size: 20px;
  margin-right: 5px;
}

#refresh-button:hover {
  background-color: #00a0f6;
}

.spinner {
  display: block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: #3498db;
  animation: spin 1s ease-in-out infinite;
  margin: 80px auto 20px auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Performance table */
#perf-table {
  width: 100%;
  max-width: 1500px;
  border-collapse: collapse;
  table-layout: auto;
}

#perf-table th,
#perf-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

#perf-table thead th {
  background-color: #555;
  color: #ecf0f1;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 1;
}

#perf-table thead th.run-header {
  text-align: center;
}

#perf-table thead th .run-timestamp {
  font-weight: normal;
  font-size: 12px;
  opacity: 0.85;
}

#perf-table thead th .run-id {
  font-weight: normal;
  font-size: 11px;
  opacity: 0.65;
}

#perf-table tbody tr:nth-child(even) {
  background-color: #f0f0f0;
}

#perf-table tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

#perf-table tbody tr:hover {
  background-color: #e0e0e0;
}

#perf-table td.step-name {
  font-weight: bold;
  white-space: nowrap;
}

#perf-table td.time-cell {
  text-align: center;
  white-space: nowrap;
}

.time-diff {
  font-size: 11px;
  margin-left: 4px;
  opacity: 0.8;
}

.fastest {
  color: #388E3C;
  font-weight: bold;
}

.slowest {
  color: #D32F2F;
  font-weight: bold;
}

/* Total row */
#perf-table tbody tr.total-row {
  border-top: 2px solid #555;
  font-weight: bold;
  background-color: #e8e8e8;
}

#perf-table tbody tr.total-row:hover {
  background-color: #d8d8d8;
}

.error-message {
  color: #D32F2F;
  text-align: center;
  padding: 40px;
  font-size: 18px;
}
