.dialog-content-wrapper {
  height: 70vh;
  max-height: 80vh;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
}

.processor-layout {
  display: flex;
  flex-direction: row;
  gap: 20px;
  height: 100%;
  overflow: hidden;
  padding: 24px; /* Standard dialog padding */
}

.video-column {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  border-right: 1px solid rgba(0, 0, 0, 0.12);
  padding-right: 20px;
  overflow-y: auto; /* Allow video column to scroll if video is huge, though unlikely */
}

.controls-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  padding-right: 10px;
  padding-left: 10px;
}

.video-preview {
  width: 100%;
  display: flex;
  justify-content: center;
}

.video-container {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.video-container video {
  display: block;
  max-width: 100%;
  max-height: 60vh; /* Use viewport height unit */
  border-radius: 4px;
  background-color: black;
}

.sample-region-overlay {
  position: absolute;
  border: 2px solid red;
  background-color: rgba(255, 0, 0, 0.2);
  pointer-events: none;
  z-index: 10;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-row label {
  font-weight: bold;
  min-width: 120px;
}

.video-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-btn mat-icon {
  font-size: 24px;
  width: 24px;
  height: 24px;
}

.processor-mode-option {
  width: 100%;
}

.control-row-group {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-item label {
  font-weight: bold;
  white-space: nowrap;
}

.control-item mat-slider {
  width: 100px;
}

.control-group-nowrap {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  width: 100%;
  /* overflow-x: auto; Removed to prevent clipping of slider labels */
  padding-bottom: 5px;
}

.control-group-nowrap .control-item {
  flex: 0 0 auto;
}

.control-group-nowrap .control-item mat-slider {
  width: 80px;
}

/* Adjust mat-form-field to look normal in dialog */
::ng-deep .processor-mode-option .mat-mdc-form-field-wrapper {
  padding-bottom: 0;
}
