.container {
  position: relative;
  background-color: #ffffff;
  padding: 2em 1em;
}

.container var {
  font-style: normal;
}

[data-theme="dark"] .container {
  background-color: #242526;
}

.container h2 {
  margin-bottom: 4px;
  font-weight: 800;
}

.column {
  margin: 0 auto;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.column hr {
  align-self: stretch;
  margin: 0.5em 0;
  background-color: #e0e0e0;
}

.subhead {
  line-height: 1.5;
  margin-top: 8px;
  margin-bottom: 0;
}

.sensors {
  display: flex;
  gap: 4px 16px;
  flex-wrap: wrap;
}

.sensorsTable {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background: transparent;
  overflow: hidden;
}

[data-theme="dark"] .sensorsTable {
  background: transparent;
}

.sensorsTable td {
  border: 0px solid #e0e0e0;
  border-collapse: collapse;
  padding: 0.5rem 1rem;
  vertical-align: top;
}

.sensorsTable tr {
  border: none;
}

.sensorsGrid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.5rem;
  align-items: center;
  width: 100%;
  margin: 16px 0;
}

.sensorCategory {
  color: #666;
  font-weight: bold;
  white-space: nowrap;
  text-align: right;
}

[data-theme="dark"] .sensorCategory {
  color: #999;
}

.sensors input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  outline: none;
  margin: 0 8px 0 0;
  position: relative;
  cursor: pointer;
  vertical-align: middle;
  transition: all 0.2s ease;
}

[data-theme="dark"] .sensors input[type="checkbox"] {
  border-color: #4a4a4a;
}

.sensors input[type="checkbox"]:checked {
  border-color: #6f3be8;
  background: #6f3be8;
}

[data-theme="dark"] .sensors input[type="checkbox"]:checked {
  border-color: #9f7bff;
  background: #9f7bff;
}

.sensors input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -65%) rotate(45deg);
}

.sensors label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 6px 0;
  transition: all 0.2s ease;
}

.sensors label:hover input[type="checkbox"] {
  border-color: #6f3be8;
}

[data-theme="dark"] .sensors label:hover input[type="checkbox"] {
  border-color: #9f7bff;
}

@media screen and (max-width: 500px) {
  .sensors {
    /* flex-direction: column;
    align-items: flex-start; */
  }

  .recordingControls {
    flex-direction: column;
  }
}

.recordingDot {
  display: inline-block;
  width: 10px;
  height: 10px;
  position: relative;
  bottom: 1px;
  margin-right: 5px;
  border-radius: 50%;
  background-color: currentColor;
  vertical-align: middle;
}

.recordingDotActive {
  border-radius: 0;
}

.recordingControls {
  display: flex;
  gap: 32px;
  justify-content: center;
}

.recordingControlsColumn {
  flex: 1 1 33%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

.recordingButtons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

.downloadButton {
  padding: 6px;
  white-space: normal;
}

.recordingStatsSection h4 {
  margin: 0;
}

.statsCounters {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 0px 0 8px 0;
}

.statCounter {
  background: #f5f1ff;
  border: 1px solid #6f3be87f;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: smaller;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 1px 2px #0001;
}

.statCounter var {
  font-style: normal;
  margin-right: 4px;
}

[data-theme="dark"] .statCounter {
  background: #2a223a;
  border-color: #6f3be87f;
  color: #bfaaff;
}

.mediaRow {
  display: flex;
  gap: 32px;
  justify-content: center;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 24px auto;
}

@media (max-width: 700px) {
  .mediaRow {
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
  }
}

.mediaContainer {
  background-color: #6f3be80f;
  border: 1px solid #e0e0e0;
  font-size: 0.8rem;
  padding: 0.5rem;
  aspect-ratio: 4 / 3;
  width: 100%;
  max-width: none;
  flex: 1 1 0;
  min-width: 0;
  min-height: 260px;
  height: 320px;
  align-self: center;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audioWaveform {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #000000;
}

[data-theme="dark"] .mediaContainer {
  background-color: transparent;
}

.mediaContainer video {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  z-index: 0;
}

.mediaContainer .mediaErrorContainer {
  width: 100%;
  height: 100%;
  position: absolute;
  background-color: #f5f1ffc4;
  padding: 0.5rem;
  inset: 0;
  z-index: 1;
}

[data-theme="dark"] .mediaContainer .mediaErrorContainer {
  background-color: #17151ec4;
}

.mediaPlaceholderText {
  font-weight: 600;
  cursor: pointer;
}

.mediaLoadingIndicator {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 80%;
}

.error {
  color: #db3553;
  font-weight: 600;
}

.downloadContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.downloadInfo {
  font-weight: 600;
  font-size: 0.8rem;
  border: 1px solid #6f3be87f;
  background-color: #fafafa7f;
  padding: 6px 6px 6px 12px;
  margin-bottom: 16px;
}

[data-theme="dark"] .downloadInfo {
  background-color: transparent;
  border-color: #585858;
}

.h264Warning {
  font-weight: 600;
  font-size: 0.8rem;
  border: 1px solid var(--ifm-color-warning-dark);
  background-color: var(--ifm-color-warning-contrast-background);
  padding: 6px 6px 6px 12px;
  margin-bottom: 16px;
  color: var(--ifm-color-warning-contrast-foreground);
}

.downloadInfoCloseButton {
  float: right;
  font-size: 1rem;
  padding: 0 4px;
}

.videoFormatGroup {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.videoFormatGroup > label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.videoFormatSelect {
  appearance: none;
  background-color: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 14px;
  width: 100%;
  max-width: 200px;
  cursor: pointer;
  color: inherit;
}

[data-theme="dark"] .videoFormatSelect {
  border-color: #4a4a4a;
}

.videoFormatSelect:focus {
  outline: none;
  border-color: #6f3be8;
}

[data-theme="dark"] .videoFormatSelect:focus {
  border-color: #9f7bff;
}

.videoFormatSelect:hover {
  border-color: #6f3be8;
}

[data-theme="dark"] .videoFormatSelect:hover {
  border-color: #9f7bff;
}

.deviceSelector {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 12px;
  align-items: center;
  margin: 0;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

[data-theme="dark"] .deviceSelector {
  background-color: #2a2a2a;
  border-color: #4a4a4a;
}

.deviceLabel {
  font-weight: 600;
  color: #333;
  font-size: 14px;
  text-align: right;
}

[data-theme="dark"] .deviceLabel {
  color: #ccc;
}

.deviceSelect {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: white;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

[data-theme="dark"] .deviceSelect {
  background-color: #3a3a3a;
  border-color: #555;
  color: #fff;
}

.deviceSelect:focus {
  outline: none;
  border-color: #6f3be8;
  box-shadow: 0 0 0 2px rgba(111, 59, 232, 0.2);
}

[data-theme="dark"] .deviceSelect:focus {
  border-color: #9f7bff;
  box-shadow: 0 0 0 2px rgba(159, 123, 255, 0.2);
}

.deviceSelect:hover {
  border-color: #6f3be8;
}

[data-theme="dark"] .deviceSelect:hover {
  border-color: #9f7bff;
}

.deviceSelect option {
  background-color: white;
  color: #333;
}

[data-theme="dark"] .deviceSelect option {
  background-color: #3a3a3a;
  color: #fff;
}
