/* Camera View Styles */
.camera-body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.camera-container {
    position: relative;
    width: 100%;
    flex: 1;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 0;
    transition: box-shadow 0.3s ease;
}

/* Training Mode Visual Indicator */
.camera-container.training-mode {
    box-shadow: 0 0 0 4px #3b82f6, 0 0 30px rgba(59, 130, 246, 0.5);
    animation: trainingPulse 2s ease-in-out infinite;
}

@keyframes trainingPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px #3b82f6, 0 0 30px rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 0 4px #3b82f6, 0 0 40px rgba(59, 130, 246, 0.8);
    }
}

.training-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    padding: 6px 12px; /* Reduced from var(--spacing-sm) var(--spacing-md) */
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.training-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Reduced gap */
    color: white;
    font-weight: 600;
    font-size: 11px; /* Smaller font */
}

.training-icon {
    font-size: 16px; /* Smaller icon */
}

.training-text {
    font-size: 12px; /* Smaller text */
    letter-spacing: 0.5px;
}

.training-hint {
    font-size: 10px; /* Smaller hint */
    opacity: 0.9;
    font-weight: 400;
}

/* Hand Distance Warning Banner */
.hand-distance-warning {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    padding: 10px 20px;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: warningSlideIn 0.3s ease-out;
    max-width: 80%;
}

.hand-distance-warning.warning-close {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.hand-distance-warning.warning-far {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.hand-distance-warning.warning-good {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

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

.warning-text {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-align: center;
}

@keyframes warningSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes warningPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.skeleton-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.camera-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Camera Placeholder */
.camera-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    gap: var(--spacing-md);
}

.placeholder-icon {
    color: var(--color-primary);
    opacity: 0.4;
}

.placeholder-icon svg {
    display: block;
}

.placeholder-text {
    color: var(--color-text-muted);
    font-size: var(--font-size-lg);
}

/* Detection State Visual Feedback */
.camera-container.detecting-high {
    box-shadow: 0 0 0 3px var(--color-success), 0 0 20px rgba(16, 185, 129, 0.4);
    animation: detectPulseHigh 1.5s ease-in-out infinite;
}

@keyframes detectPulseHigh {
    0%, 100% {
        box-shadow: 0 0 0 3px var(--color-success), 0 0 20px rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 3px var(--color-success), 0 0 30px rgba(16, 185, 129, 0.6);
    }
}

.camera-container.detecting-medium {
    box-shadow: 0 0 0 3px #f59e0b, 0 0 20px rgba(245, 158, 11, 0.4);
}

.camera-container.detecting-low {
    box-shadow: 0 0 0 2px #ef4444, 0 0 15px rgba(239, 68, 68, 0.3);
}

/* Camera Controls */
.camera-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-shrink: 0;
    padding: 0.25rem 0;
}

.camera-controls .btn-control {
    min-width: 60px;
    min-height: 44px;
}

@media (max-width: 768px) {
    .camera-controls {
        padding: 0.3rem 0;
    }
    
    .camera-controls .btn-control {
        min-width: 60px;
        min-height: 40px;
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Mobile Portrait & Landscape */
@media (max-width: 768px) {
    .camera-container {
        border-radius: var(--radius-md);
    }
    
    .training-banner {
        padding: 4px 8px;
    }
    
    .training-banner-content {
        gap: 6px;
        font-size: 10px;
    }
    
    .training-icon {
        font-size: 14px;
    }
    
    .training-text {
        font-size: 11px;
    }
    
    .training-hint {
        font-size: 9px;
        display: none; /* Hide hint on small screens */
    }

    .placeholder-icon svg {
        width: 48px;
        height: 48px;
    }

    .placeholder-text {
        font-size: var(--font-size-base);
    }
}

/* Mobile Landscape - Optimize camera height */
@media (max-width: 768px) and (orientation: landscape) {
    .camera-container {
        max-height: calc(100dvh - 140px);
    }
}

/* Extra Small Mobile */
@media (max-width: 374px) {
    .training-text {
        font-size: 10px;
    }
    
    .placeholder-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .placeholder-text {
        font-size: var(--font-size-sm);
    }
}

