/* General page layout */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: auto;
  min-height: 100vh;
  background-color: #333333;
  color: #eeeeee;
  font-family: Arial, sans-serif;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Grid layout for main app */
.layout {
  width: 100vw;
  height: auto;
  min-height: 1080px;
  display: grid;
  grid-template-areas:
    "header header"
    "camera controls"
    "plot1 plot2"
    "plot1 plot2";
  grid-template-rows: 8vh 48vh 18vh 18vh; /* was 22vh each */
  grid-template-columns: 60% 40%;
  gap: 10px;
  padding: 10px;
}

/* Header section */
header {
  grid-area: header;
  text-align: center;
  font-size: 1.5em;
}

/* Video and overlay */
.camera-container {
  grid-area: camera;
  position: relative;
  width: 100%;
  height: 100%;
  background: black;
}

#webcam {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: black; /* Fills any extra space around the video */
}

#poseCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#feedbackPanel {
  grid-column: span 2;
  color: #eeeeee;
  padding: 10px;
  font-family: sans-serif;
  grid-area: plot2

}

.feedback-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.feedback-table th,
.feedback-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #666666;
}

.feedback-table thead {
  background-color: #333333;
}

.feedback-table th {
  font-weight: bold;
}

.feedback-table tbody tr:nth-child(even) {
  background-color: #222222;
}


/* Controls area */
.controls {
  grid-area: controls;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  overflow-y: auto;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
button {
  padding: 8px 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}

.recording-button {
  background-color: #dc3545 !important;
}

.recording-button:hover {
  background-color: #c82333 !important;
}

.download-button {
  background-color: #ff8c00;
}

.download-button:hover {
  background-color: #cc7000;
}

.js-plotly-plot .axis-title {
  font-size: 16px !important;
  fill: #eeeeee !important;
}

/* Plot areas */
#posePlot,
#handPlot {
  width: 100%;
  height: 100%;
  background-color: #555555 !important; /* Make background a solid, contrasting color */
  padding-bottom: 10px;
  box-sizing: border-box;
}

#posePlot {
  grid-area: plot1;
}

#handPlot {
  grid-area: plot1;
}

