/* Left Image Container */
.toggle-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.toggle-left-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.15),
    0 0 0 3px rgba(255, 255, 255, 0.8),
    0 0 0 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 2px solid #ffffff;
}

.toggle-left-image:hover {
  transform: scale(1.05);
  box-shadow: 
    0 6px 25px rgba(0, 0, 0, 0.2),
    0 0 0 3px rgba(255, 255, 255, 0.9),
    0 0 0 4px rgba(59, 130, 246, 0.3);
}

/* Professional Toggle Switch - Compact Width */
.toggle-container {
  position: relative;
  display: flex;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border-radius: 16px;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  padding: 6px;
  transition: all 0.3s ease;
  max-width: 310px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.toggle-option {
  position: relative;
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
  z-index: 2;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  color: #64748b;
  display: flex;
  align-items: center;
  font-size: 13px;
  border-radius: 12px;
  user-select: none;
  flex: 1;
  justify-content: center;
  min-height: 44px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: 0.025em;
}

.toggle-option:hover {
  color: #334155;
  transform: translateY(-1px);
}

.toggle-option.active {
  color: #1e293b;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.icon-container {
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  width: 18px;
  height: 18px;
}

.toggle-option.active .icon-container {
  /* Removed transform to prevent text jumping */
}

.toggle-slider {
  position: absolute;
  top: 6px;
  left: 6px;
  width: calc(50% - 12px);
  height: calc(100% - 12px);
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  z-index: 1;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Professional Icon Animations - Compact Size */
.camera-icon, .ball-icon {
  transition: all 0.3s ease;
  font-size: 15px;
}

.camera-active {
  color: #3b82f6;
  filter: drop-shadow(0 2px 6px rgba(59, 130, 246, 0.4));
  transform: scale(1.1);
}

.camera-inactive {
  color: #94a3b8;
}

.ball-active {
  color: #10b981;
  filter: drop-shadow(0 2px 6px rgba(16, 185, 129, 0.4));
  transform: scale(1.1);
}

.ball-inactive {
  color: #94a3b8;
}



/* Subtle Active Indicator */
.active-indicator {
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s ease;
}

.toggle-option.active .active-indicator {
  opacity: 1;
  transform: translateY(4px);
}

/* Content Transition */
#mainContent {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Enhanced Toggle Container Hover Effects */
.toggle-container:hover {
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.18),
    0 4px 16px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Active State Enhancements */
.toggle-option.active {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Smooth Slider Animation */
.toggle-slider {
  backdrop-filter: blur(10px);
}

/* Focus States for Accessibility */
.toggle-option:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 12px;
}

/* Loading State */
.toggle-container.loading {
  pointer-events: none;
  opacity: 0.7;
}

.toggle-container.loading .toggle-slider {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .toggle-image-container {
    margin-right: 8px;
  }
  
  .toggle-left-image {
    width: 45px;
    height: 45px;
  }
  
  .toggle-container {
    padding: 1px;
    border-radius: 14px;
    max-width: 270px;
  }
  
  .toggle-option {
    padding: 10px 12px;
    font-size: 12px;
    min-height: 38px;
  }
  
  .icon-container {
    margin-right: 6px;
    width: 16px;
    height: 16px;
  }
  
  .camera-icon, .ball-icon {
    font-size: 13px;
  }
  
  .toggle-slider {
    top: 4px;
    left: 4px;
    width: calc(50% - 8px);
    height: calc(100% - 8px);
    border-radius: 10px;
  }
}

@media (max-width: 480px) {
  .toggle-container {
    padding: 3px;
    border-radius: 12px;
    max-width: 240px;
  }
  
  .toggle-option {
    padding: 8px 10px;
    font-size: 11px;
    min-height: 34px;
    flex-direction: row;
    gap: 0;
  }
  
  .icon-container {
    margin-right: 4px;
    margin-bottom: 0;
    width: 14px;
    height: 14px;
  }
  
  .camera-icon, .ball-icon {
    font-size: 12px;
  }
  
  .toggle-slider {
    top: 3px;
    left: 3px;
    width: calc(50% - 6px);
    height: calc(100% - 6px);
    border-radius: 9px;
  }
}

@media (max-width: 360px) {
  .toggle-container {
    max-width: 180px;
  }
  
  .toggle-option {
    padding: 6px 8px;
    font-size: 10px;
    min-height: 30px;
  }
  
  .toggle-option span {
    display: block;
  }
  
  .icon-container {
    margin-right: 3px;
    width: 12px;
    height: 12px;
  }
  
  .camera-icon, .ball-icon {
    font-size: 11px;
  }
}