/* Global dark theme with Roboto */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Roboto", sans-serif;
  background-color: #1e1e1e;
  color: #ffffff;
}
body {
  display: flex;
  overflow: hidden;
}
/* Sidebar styling */
.sidebar {
  width: 250px;
  background-color: #2e2e2e;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.sidebar header {
  font-size: 1.2em;
  margin-bottom: 5px;
  text-align: center;
  font-weight: 500;
}
.sidebar .version {
  font-size: 0.75em;
  margin-bottom: 10px;
  text-align: center;
  color: #888888;
  font-weight: 400;
}
/* PIN entry container: LED indicator, input box, and Connect button on one line */
.pin-entry {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.connection-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: red; /* Default: disconnected */
  margin-right: 8px;
  flex-shrink: 0;
}
.pin-entry input {
  flex: 1;
  padding: 5px;
  border: 1px solid #444444;
  border-radius: 4px;
  background-color: #1e1e1e;
  color: #ffffff;
  height: 40px;
  box-sizing: border-box;
}
/* Connect button as a fixed square showing a Font Awesome power-off icon */
#setPinButton {
  width: 40px;
  height: 40px;
  padding: 0;
  margin-left: 8px;
  border: none;
  background-color: #444444;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
#setPinButton:hover {
  background-color: #555555;
}
#setPinButton i {
  font-size: 20px;
  color: #ffffff;
}
/* Camera list panel */
.camera-list {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 10px;
}
/* Action buttons container */
.action-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.action-buttons button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background-color: #444444;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.action-buttons button:hover {
  background-color: #555555;
}
.action-buttons button i {
  font-size: 20px;
  color: #ffffff;
}
/* Each camera item */
.camera-item {
  display: flex;
  align-items: center;
  padding: 8px;
  margin-bottom: 6px;
  border-radius: 4px;
  cursor: pointer;
  background-color: #2e2e2e;
  border: 1px solid #444444;
  transition: background 0.2s;
}
.camera-item:hover {
  background-color: #3e3e3e;
}
.camera-item .indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: red;
  margin-right: 10px;
  flex-shrink: 0;
}
.camera-item.selected {
  background-color: #4e4e4e;
}
.camera-item.selected .indicator {
  background-color: green;
}
/* Main content area */
.main {
  flex: 1;
  background-color: #1e1e1e;
  display: flex;
  flex-direction: column;
  padding: 10px;
  box-sizing: border-box;
}
.video-container {
  flex: 1;
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Video element styling - size will be set dynamically */
video {
  object-fit: contain;
}

/* Mobile styling: assume a max-width breakpoint, or use a pointer media query */
@media only screen and (max-width: 768px) {
  .video-container {
    width: calc(100vw - 250px);
    height: 100vh;
  }
  /* Make the video fill the container */
  video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
