/* theDiscussion.css */

/* Basic Styling */

h1 {
  text-align: center;
}

/* Controls Panel */
.controls {
  margin-bottom: 20px;
  text-align: center;
}

.controls select,
.controls button,
.controls input[type="range"] {
  padding: 8px 16px;
  font-size: 1em;
  margin: 5px;
}

.controls label {
  font-weight: bold;
  margin-right: 5px;
}

/* Main Container */
.main-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

/* Simulation Area (Roundtable) */
#simContainer {
  position: relative;
  width: 600px;
  height: 600px;
  background: #fff;
  border: 2px solid #333;
  overflow: hidden;
  padding: 10px;
  /* Default scaling; use media queries to scale on smaller viewports */
  transform: scale(1);
  transform-origin: top left;
}

#table {
  position: absolute;
  width: 400px;
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid #333;
  border-radius: 50%;
  background: #ddd;
}

/* Participant Avatars (display names only) */
.participant {
  position: absolute;
  padding-left: 5px;
  padding-right: 5px;
  min-width: 50px;
  width: fit-content;
  height: 50px;
  border-radius: 25px;
  background: #eee;
  cursor: pointer;
  transition: background-color 0.3s ease;
  line-height: 50px;
  font-size: 0.9em;
  font-weight: bold;
  text-align: center;
}

/* Speech Bubble */
.Newbubble {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px 20px;
  z-index: 10;
  font-size: 1em;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  white-space: normal;
  word-wrap: break-word;
}

.bubble {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px 20px;
  z-index: 10;
  font-size: tiny;
  max-width: 90%;
  white-space: normal;
  word-wrap: break-word;
}

/* SVG Arrow Layer */
#arrowLayer {
  position: absolute;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  pointer-events: none;
  overflow: visible;
}

/* Animate lines drawn in the arrowLayer */
#arrowLayer line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 1s linear forwards;
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

/* Transcript Panel */
#transcript {
  width: 300px;
  height: 600px;
  background: #fff;
  border: 2px solid #333;
  overflow-y: auto;
  padding: 10px;
}

#transcript h2 {
  margin-top: 0;
  text-align: center;
  font-size: 1.2em;
}

#transcript .entry {
  border-bottom: 1px solid #ddd;
  padding: 5px 0;
  font-size: 0.9em;
}

/* Responsive Scaling for simContainer */
@media screen and (max-width: 600px) {
  #simContainer {
    transform: scale(0.8);
    transform-origin: top left;
  }
}

@media screen and (max-width: 400px) {
  #simContainer {
    transform: scale(0.6);
    transform-origin: top left;
  }
}

.arrowLayerStyle {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10; /* Ensure it overlays other elements */
}