/**
 * Layout Styles
 *
 * Responsive layout system for the voice demo UI.
 * Supports split-screen and stacked layouts across different screen sizes.
 */

/* Main layout container */
.voice-demo-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  background: #f9fafb;
}

/* Header */
.voice-demo-header {
  padding: 1.5rem 2rem;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.voice-demo-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.voice-demo-header p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

/* Main content area */
.voice-demo-main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Desktop split-screen layout (1024px+) */
@media (min-width: 1024px) {
  .voice-demo-main {
    flex-direction: row;
  }

  .voice-demo-video-section {
    flex: 0 0 70%;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    overflow-y: auto;
  }

  .voice-demo-controls-section {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column;
    padding: 2rem 2rem 2rem 1rem;
    background: white;
    border-left: 1px solid #e5e7eb;
    overflow-y: auto;
  }
}

/* Tablet stacked layout (768-1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .voice-demo-main {
    flex-direction: column;
  }

  .voice-demo-video-section {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    overflow-y: auto;
  }

  .voice-demo-controls-section {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    overflow-y: auto;
  }
}

/* Mobile layout (<768px) */
@media (max-width: 767px) {
  .voice-demo-header {
    padding: 1rem 1.5rem;
  }

  .voice-demo-header h1 {
    font-size: 1.5rem;
  }

  .voice-demo-main {
    flex-direction: column;
  }

  .voice-demo-video-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow-y: auto;
  }

  .voice-demo-controls-section {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    max-height: 40vh;
    overflow-y: auto;
  }
}

/* Video container */
.video-container {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.video-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

/* Controls container */
.controls-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Card style for sections */
.card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.card-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Grid layouts */
.grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .grid-2col,
  .grid-3col {
    grid-template-columns: 1fr;
  }
}

/* Flex utilities */
.flex-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.flex-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-wrap {
  flex-wrap: wrap;
}

/* Spacing utilities */
.gap-sm {
  gap: 0.5rem;
}

.gap-md {
  gap: 1rem;
}

.gap-lg {
  gap: 1.5rem;
}

.gap-xl {
  gap: 2rem;
}

/* Padding utilities */
.p-0 {
  padding: 0;
}

.p-sm {
  padding: 0.5rem;
}

.p-md {
  padding: 1rem;
}

.p-lg {
  padding: 1.5rem;
}

.p-xl {
  padding: 2rem;
}

/* Margin utilities */
.m-0 {
  margin: 0;
}

.mt-sm {
  margin-top: 0.5rem;
}

.mt-md {
  margin-top: 1rem;
}

.mt-lg {
  margin-top: 1.5rem;
}

.mb-sm {
  margin-bottom: 0.5rem;
}

.mb-md {
  margin-bottom: 1rem;
}

.mb-lg {
  margin-bottom: 1.5rem;
}

/* Full width/height utilities */
.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

/* Text utilities */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* Overflow utilities */
.overflow-hidden {
  overflow: hidden;
}

.overflow-auto {
  overflow: auto;
}

.overflow-y-auto {
  overflow-y: auto;
}

/* Responsive visibility */
.hide-mobile {
  display: block;
}

@media (max-width: 767px) {
  .hide-mobile {
    display: none;
  }
}

.hide-tablet {
  display: block;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hide-tablet {
    display: none;
  }
}

.hide-desktop {
  display: block;
}

@media (min-width: 1024px) {
  .hide-desktop {
    display: none;
  }
}

/* Scrollbar styling */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Animation utilities */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-in;
}

.animate-slide-in {
  animation: slideIn 0.4s ease-out;
}
