/* Reset & Full-Height Layout */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  background-color: #1c1c1c;
  font-family: Arial, sans-serif;
  color: #ffffff;
}

/* Hamburger Menu */
.hamburger {
  position: fixed;
  top: 20px;
  left: 20px;
  font-size: 26px;
  cursor: pointer;
  z-index: 1000;
  color: #ffffff;
  transition: left 0.3s ease;
}

/* Side Panel */
.side-panel {
  position: fixed;
  top: 0;
  left: -320px;
  width: 320px;
  height: 100%;
  background-color: #2a2a2a;
  overflow-y: auto;
  transition: left 0.3s ease;
  z-index: 999;
}
.side-panel.open {
  left: 0;
}
.side-panel-content {
  padding: 20px;
}
.side-panel-content h2 {
  margin-bottom: 10px;
}
.side-panel-content hr {
  border: 0;
  border-top: 1px solid #444;
  margin: 10px 0;
}
.control-group {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Page Container (Vertical Flex Layout) */
.page-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Top Header */
.top-header {
  flex: 0 0 auto;
  text-align: center;
  padding: 20px;
}

/* Chat Container (Scrollable) */
.chat-container {
  flex: 1 1 auto;
  margin: 20px auto;
  width: 80%;
  background-color: #333333;
  border-radius: 5px;
  padding: 10px;
  text-align: left;
  overflow-y: auto;
  min-width: 300px;
  transition: width 0.3s ease;
}

/* Adjust chat container width when side panel is open */
.side-panel.open ~ .page-container .chat-container {
  width: 60%;
}

/* Chat Message Boxes */
.message {
  margin: 10px 0;
  padding: 10px;
  border-radius: 5px;
  background-color: #555555;
}
.message.user {
  background-color: #666666;
  text-align: right;
}
.message.ai {
  background-color: #777777;
  text-align: left;
}

/* Bottom Input Bar */
.bottom-input-bar {
  flex: 0 0 auto;
  display: flex;
  background-color: #2a2a2a;
  padding: 10px;
  align-items: center;
  justify-content: center;
}
.bottom-input-bar input[type="text"] {
  flex: 1;
  margin-right: 10px;
  padding: 10px;
  background-color: #333;
  border: 1px solid #444;
  color: #fff;
  border-radius: 5px;
}
.bottom-input-bar button {
  padding: 10px 20px;
  background-color: #333;
  border: 1px solid #444;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
}
.bottom-input-bar button:hover {
  background-color: #555;
}

/* Side Panel Controls (Buttons, Selects, etc.) */
button, select, input[type="range"], textarea {
  margin: 5px 0;
  padding: 8px 10px;
  font-size: 16px;
  background-color: #333333;
  color: #ffffff;
  border: 1px solid #555555;
  border-radius: 5px;
}

/* System Prompt Collapsible */
#systemPromptDetails {
  margin: 20px auto;
  background-color: #333333;
  border-radius: 5px;
  padding: 10px;
  text-align: left;
  width: 100%;
}
#systemPromptDetails summary {
  cursor: pointer;
  font-size: 16px;
  margin-bottom: 10px;
}
#systemPrompt {
  width: 100%;
  background-color: #333333;
  color: #ffffff;
  border: 1px solid #555555;
  border-radius: 5px;
  padding: 10px;
  font-size: 16px;
  margin-top: 10px;
}

/* Final Prompt Debug Section */
#finalPromptDisplay {
  display: none;
  margin-top: 10px;
  background: #444;
  color: #fff;
  padding: 10px;
  border-radius: 5px;
  text-align: left;
}
#finalPromptContent {
  white-space: pre-wrap;
}

/* Status & Error Messages */
#status, #errorMsg {
  font-size: 16px;
  margin-top: 10px;
  background-color: #222;
  border-radius: 5px;
  padding: 10px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Mic Icon Styles */
.mic-icon {
  font-size: 24px;
  cursor: pointer;
  margin-right: 10px;
  background-color: #222; /* default background */
  color: white;          /* default text color */
  border-radius: 50%;
  padding: 4px;
  transition: background-color 0.3s ease;
}
.mic-icon.active {
  background-color: green;
  color: white;
}
.mic-icon.inactive {
  background-color: red;
  color: white;
}

/* Speaker Icon Styles */
.speaker-icon {
  font-size: 24px;
  cursor: pointer;
  margin-right: 10px;
  background-color: #222; /* default background */
  color: white;          /* default text color */
  border-radius: 50%;
  padding: 4px;
  transition: background-color 0.3s ease;
}
.speaker-icon.active {
  background-color: green;
  color: white;
}
.speaker-icon.inactive {
  background-color: red;
  color: white;
}





/* Container for TTS settings */
#ttsSettings {
  background-color: #2a2a2a;
  padding: 10px;
  border-radius: 5px;
  margin: 10px 0;
  color: #fff;
}

#ttsSettings h3 {
  margin-top: 0;
}

/* Each row is displayed as a flex container */
.settings-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}

.settings-row label {
  margin-right: 8px;
  white-space: nowrap;
}

/* Inputs have consistent styling */
#ttsSettings input[type="number"] {
  width: 80px; /* Adjust as desired */
  margin-right: 10px;
  border: 1px solid #555;
  border-radius: 3px;
  background-color: #222;
  color: #fff;
  padding: 4px;
}

/* Pitch/Rate sliders outside TTS settings can be styled similarly */
input[type="range"] {
  margin-right: 8px;
}





/* Floating container for screen share */
#floatingContainer {
  position: fixed;
  top: 50px;
  right: 20px;
  width: 400px;
  height: 250px;
  background: white;
  border: 2px solid black;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  resize: both;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

/* Handle for dragging */
#dragHandle {
  background: black;
  color: white;
  padding: 5px;
  text-align: center;
  cursor: grab;
  user-select: none;
}

/* Resizable video */
#screenVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
}
