/* ===== Base Layout ===== */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #222831;
  color: #eeeeee;
  font-family: Arial, sans-serif;
  margin: 0;
}

* {
  box-sizing: border-box;
}

header {
  width: 100%;
  background-color: #393e46;
  padding: 10px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

footer {
  width: 100%;
  height: 60px;
  background-color: #393e46;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 20px;
}

footer span {
  padding: 20px;
}

hr {
  width: 100%;
  border: none;
  border-top: 1px solid #eeeeee;
  margin: 10px 0 15px;
}

/* ===== Containers ===== */

.container {
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 15px 20px;
  gap: 8px;
  background-color: #393e46;
  border-radius: 16px;
}

.card-title {
  width: 100%;
  display: flex;
  gap: 10px;
}

.card-title h3 {
  margin: 10px 0;
  font-size: 1.4rem;
}

.Description-container {
  /* max-width: 300px; */
  width: 90%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.main-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.selector-section {
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: nowrap;
  margin-right: 30px;
}

#input-process-container {
  position: relative;
  margin-bottom: 25px;
}

.slider-container {
  position: relative;
  width: 300px;
  align-items: flex-start;
}

#quantumContainer {
  width: 100%;
  align-items: flex-start;
}

.quantum-slider-container {
  position: relative;
  width: 100%;
}

#processTableContainer {
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.summary-group {
  background-color: #00adb5;
  border-radius: 18px;
  padding: 14px 16px;
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

}

.summary-name {
  font-size: 1.3rem;
  font-weight: bold;
  color: #eeeeee;
}

.summary-btn {
  width: 30px;
  height: 30px;
  background-color: #00adb5;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Typography & Labels ===== */
.qu-label {
  margin-bottom: 5px;
  font-size: 0.9rem;
}

/* #valueLabel {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  transform: translateX(-50%);
  pointer-events: none;
} */
.pcb-label {
  margin-left: 5px;
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.summary-header h3 {
  margin: 0;
}

/* ===== Form Elements ===== */
select {
  background-color: #00adb5;
  color: #eeeeee;
  box-shadow: none;
  border: none;
  border-radius: 5px;
  width: 175px;
  height: 25px;
  margin: 0;
}

input {
  background-color: #00adb5;
  color: #eeeeee;
  border-radius: 5px;
  box-shadow: none;
  border: none;
  width: 65px;
  height: 30px;
}

/* ===== Buttons ===== */
.process-btn {
  background-color: #00adb5;
  color: #eeeeee;
  border-radius: 5px;
  box-shadow: none;
  border: none;
  width: 200px;
  height: 40px;
  /* margin-left: 20px; */
  cursor: pointer;
}

#RunBtn {
  width: 200px;
  cursor: pointer;
  margin-top: 10px;
}

#toggleSummaryBtn {
  background-color: #00adb5;
  color: #eeeeee;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 15px 0;
}

/* ===== Tooltip ===== */
.tooltip {
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #eeeeee;
  font-size: 12px;
  font-weight: bold;
  cursor: help;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 100px;
  background-color: #00adb5;
  color: #eeeeee;
  text-align: left;
  padding: 5px 8px;
  border-radius: 4px;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 0.8rem;
  pointer-events: none;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* ===== Slider ===== */
.Quantum-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: #00adb5;
  background-color: #00adb5;
  border: none;
  margin: 15px 0;
}

.slider-start {
  position: absolute;
  left: 0;
  bottom: -10px;
  font-size: 12px;
}

.slider-end {
  position: absolute;
  right: 0;
  bottom: -10px;
  font-size: 12px;
}

.Quantum-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 3px;
  height: 20px;
  background-color: #eeeeee;
  border-radius: 1px;
  cursor: pointer;
}

/* ===== Layout Helpers ===== */
.row {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-width {
  width: 100%;
  max-width: 200px;
}

.input-column {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
}

.hidden {
  display: none;
}

.summary-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

/* ===== Tables ===== */
#process-table,
.Metrics-table {
  margin-top: 10px;
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.Metrics-table {
  width: 100%;
  border-collapse: collapse;
  /* min-width: 500px; */
}

table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

#process-table th,
#process-table td,
.Metrics-table th,
.Metrics-table td {
  padding: 10px 12px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

#process-table thead th,
.Metrics-table thead th {
  font-weight: bold;
}


th,
td {
  padding: 8px 12px;
  border-bottom: 1px solid #eeeeee;
}

#summaryContent div {
  margin: 5px 15px;
  display: grid;
  grid-template-areas:
    "avg avg num"
    "avg avg num"
    "avg avg num"
  ;
  row-gap: 15px;
  column-gap: 5px;
}

/* ===== Gantt Chart ===== */
#gantt-chart-display {
  width: 100%;
  overflow-x: auto;
  /* Allow scrolling for long charts */
  padding-bottom: 30px;
  /* Space for time labels */
  margin-top: 20px;
}

.gantt-wrapper {
  display: flex;
  min-width: 100%;
  /* Ensure it fills container */
}

.gantt-block {
  height: 50px;
  background-color: #00adb5;
  border: 1px solid #eeeeee;
  color: #eeeeee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  position: relative;
  box-sizing: border-box;
  flex-shrink: 0;
  /* Prevent shrinking, force scroll */
  transition: width 0.3s;
}

.gantt-time {
  position: absolute;
  bottom: -25px;
  right: 0;
  color: #eeeeee;
  font-size: 0.85rem;
  transform: translateX(50%);
  /* Center label on the line */
}

.gantt-start-time {
  position: absolute;
  bottom: -25px;
  left: 0;
  color: #eeeeee;
  font-size: 0.85rem;
  transform: translateX(-50%);
}