/* Responsive layout fixes for video area */

/* Base layout adjustments */
.record-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.mode-selector {
  width: 100%;
  margin-bottom: var(--spacing-md);
}

.tab-buttons {
  display: flex;
  gap: var(--spacing-sm);
  background-color: var(--card-background);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-xs);
  width: 100%;
  max-width: 100%;
}

.view-container {
  display: flex;
  flex-direction: row; /* Change to row for side-by-side layout on desktop */
  gap: var(--spacing-md);
  width: 100%;
}

.video-container {
  width: 65%; /* Video takes 65% of the width */
  position: relative;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background-color: #000;
  min-height: 400px;
  aspect-ratio: 16/9;
}

.scoring-container {
  width: 35%; /* Scoring takes 35% of the width */
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

/* Video element to fill container */
#videoPreview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Large Desktop Screens */
@media screen and (min-width: 1440px) {
  .record-container {
    max-width: 95%;
  }
  
  .video-container {
    flex: 7; /* Video takes 70% on larger screens */
    max-height: 80vh;
  }
  
  .scoring-container {
    flex: 3; /* Scoring takes 30% on larger screens */
  }
}

/* Medium Screens */
@media screen and (max-width: 1024px) and (min-width: 769px) {
  .view-container {
    flex-direction: column;
  }
  
  .video-container, .scoring-container {
    width: 100%;
    flex: none;
  }
  
  .video-container {
    max-height: 60vh;
  }
}

/* Mobile Landscape */
@media screen and (max-width: 768px) {
  .view-container {
    flex-direction: column;
  }
  
  .video-container, .scoring-container {
    width: 100%;
    flex: none;
  }
  
  .view-container.recording-focus .video-container {
    max-height: 80vh;
  }
}
