/* shadcn/ui Design System CSS Variables */
:root {
  /* Colors - shadcn/ui color palette */
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;
  --primary: 221.2 83.2% 53.3%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96%;
  --secondary-foreground: 222.2 84% 4.9%;
  --muted: 210 40% 96%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96%;
  --accent-foreground: 222.2 84% 4.9%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 221.2 83.2% 53.3%;
  --radius: 0.5rem;

  /* Shadows - shadcn/ui elevation system */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Typography - shadcn/ui text scales */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* Spacing - consistent spacing scale */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
  :root {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;
    --primary: 217.2 91.2% 59.8%;
    --primary-foreground: 222.2 84% 4.9%;
    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 224.3 76.3% 94.1%;
  }
}

/* shadcn/ui Button Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: colors 0.2s;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--ring));
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all 0.2s;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border: none;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: hsl(var(--primary) / 0.9);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all 0.2s;
  padding: 0.5rem 1rem;
  cursor: pointer;
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border: 1px solid hsl(var(--border));
}

.btn-secondary:hover {
  background-color: hsl(var(--secondary) / 0.8);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all 0.2s;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border: none;
  background-color: transparent;
  color: hsl(var(--foreground));
}

.btn-ghost:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.btn-destructive {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all 0.2s;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border: none;
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.btn-destructive:hover {
  background-color: hsl(var(--destructive) / 0.9);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Button sizes */
.btn-sm {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: var(--text-xs);
}

.btn-md {
  height: 2.5rem;
  padding: 0.5rem 1rem;
}

.btn-lg {
  height: 3rem;
  padding: 0 2rem;
  font-size: var(--text-base);
}

/* Flex utilities for buttons */
.flex-1 {
  flex: 1;
}

.gap-2 {
  gap: 0.5rem;
}

/* shadcn/ui Card Components */
.card {
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow);
}

.card-header {
  padding: 1.5rem;
  padding-bottom: 0;
}

.card-title {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
}

.card-description {
  font-size: var(--text-sm);
  color: hsl(var(--muted-foreground));
}

.card-content {
  padding: 1.5rem;
  padding-top: 0;
}

.card-footer {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  padding-top: 0;
}

/* shadcn/ui Badge Components */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid transparent;
  padding: 0.125rem 0.625rem;
  font-size: var(--text-xs);
  font-weight: 600;
  transition: colors 0.2s;
}

.badge:focus {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--ring));
}

.badge-default {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid transparent;
  padding: 0.125rem 0.625rem;
  font-size: var(--text-xs);
  font-weight: 600;
  transition: colors 0.2s;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.badge-secondary {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid transparent;
  padding: 0.125rem 0.625rem;
  font-size: var(--text-xs);
  font-weight: 600;
  transition: colors 0.2s;
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.badge-outline {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.125rem 0.625rem;
  font-size: var(--text-xs);
  font-weight: 600;
  transition: colors 0.2s;
  background-color: transparent;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
}

/* shadcn/ui Input Components */
.input {
  display: flex;
  height: 2.5rem;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
  padding: 0.5rem 0.75rem;
  font-size: var(--text-sm);
  color: hsl(var(--foreground));
  transition: border-color 0.2s;
}

.input::placeholder {
  color: hsl(var(--muted-foreground));
}

.input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--ring));
}

.input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.input:focus {
  border-color: hsl(var(--ring));
}

/* shadcn/ui Navigation */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: colors 0.2s;
  border-radius: var(--radius);
  color: hsl(var(--muted-foreground));
  text-decoration: none;
}

.nav-item.active {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.nav-item:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

/* shadcn/ui Status Indicators */
.status-indicator {
  display: inline-flex;
  height: 0.5rem;
  width: 0.5rem;
  border-radius: 9999px;
}

.status-pending {
  display: inline-flex;
  height: 0.5rem;
  width: 0.5rem;
  border-radius: 9999px;
  background-color: #d1d5db;
}

.status-active {
  display: inline-flex;
  height: 0.5rem;
  width: 0.5rem;
  border-radius: 9999px;
  background-color: #3b82f6;
}

.status-completed {
  display: inline-flex;
  height: 0.5rem;
  width: 0.5rem;
  border-radius: 9999px;
  background-color: #10b981;
}

.status-error {
  display: inline-flex;
  height: 0.5rem;
  width: 0.5rem;
  border-radius: 9999px;
  background-color: #ef4444;
}

/* shadcn/ui Separator */
.separator {
  background-color: hsl(var(--border));
}

.separator-horizontal {
  background-color: hsl(var(--border));
  height: 1px;
  width: 100%;
}

.separator-vertical {
  background-color: hsl(var(--border));
  width: 1px;
  height: 100%;
}

/* shadcn/ui Typography */
.heading-1 {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.heading-2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.heading-3 {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.4;
}

.heading-4 {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.4;
}

.text-muted {
  color: hsl(var(--muted-foreground));
}

.text-subtle {
  font-size: var(--text-sm);
  color: hsl(var(--muted-foreground));
}

/* Utility Classes */
.shadow-subtle {
  box-shadow: var(--shadow-sm);
}

.shadow-soft {
  box-shadow: var(--shadow);
}

.shadow-medium {
  box-shadow: var(--shadow-md);
}

.shadow-strong {
  box-shadow: var(--shadow-lg);
}

.ring-focus:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--ring));
}

/* Icon System - Using Unicode symbols instead of emojis */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
}

.icon-microphone::before {
  content: "🎤";
}

.icon-play::before {
  content: "▶";
}

.icon-pause::before {
  content: "⏸";
}

.icon-stop::before {
  content: "⏹";
}

.icon-check::before {
  content: "✓";
}

.icon-circle::before {
  content: "○";
}

.icon-circle-filled::before {
  content: "●";
}

/* Professional icon alternatives using CSS shapes */
.icon-professional {
  width: 1rem;
  height: 1rem;
  display: inline-block;
  position: relative;
}

.icon-mic {
  background: linear-gradient(45deg, currentColor 0%, transparent 50%);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.icon-play-triangle {
  width: 0;
  height: 0;
  border-left: 0.5rem solid currentColor;
  border-top: 0.3rem solid transparent;
  border-bottom: 0.3rem solid transparent;
  background: transparent;
}

.icon-pause-bars::before {
  content: "";
  position: absolute;
  width: 0.25rem;
  height: 1rem;
  background: currentColor;
  left: 0.2rem;
}

.icon-pause-bars::after {
  content: "";
  position: absolute;
  width: 0.25rem;
  height: 1rem;
  background: currentColor;
  right: 0.2rem;
}

/* Radio Signal Visualizer */
.radio-waves {
  pointer-events: none;
}

.radio-ring {
  position: absolute;
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  animation: radioWave 2s ease-out infinite;
}

.radio-ring:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 0s;
}

.radio-ring:nth-child(2) {
  width: 160px;
  height: 160px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 0.7s;
}

.radio-ring:nth-child(3) {
  width: 240px;
  height: 240px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 1.4s;
}

@keyframes radioWave {
  0% {
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 1;
    border-width: 3px;
  }
  50% {
    opacity: 0.7;
    border-width: 2px;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
    border-width: 1px;
  }
}

/* Enhanced radio wave for active state */
.radio-waves.active .radio-ring {
  border-color: rgba(34, 197, 94, 0.4);
  animation-duration: 1.5s;
}

.radio-waves.listening .radio-ring {
  border-color: rgba(59, 130, 246, 0.6);
  animation-duration: 1s;
}

.radio-waves.speaking .radio-ring {
  border-color: rgba(168, 85, 247, 0.5);
  animation-duration: 0.8s;
}