/* Camera Selector */
.camera-selector {
    margin-bottom: 1rem;
}

.camera-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: nowrap;
    gap: 12px;
}

.camera-selector-header > label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #2d3748;
    font-size: 13px;
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

.camera-selector > label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 13px;
}

.camera-selector label i {
    color: #3182ce;
}

.select-wrapper {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.camera-selector select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background: white;
    color: #2d3748;
    font-size: 14px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%234a5568' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.camera-selector select:hover:not(:disabled) {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.camera-selector select:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

.camera-selector select:disabled {
    background-color: #f7fafc;
    color: #a0aec0;
    cursor: not-allowed;
}

.btn-icon {
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background: white;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
}

.btn-icon:hover {
    background: #f7fafc;
    border-color: #3182ce;
    color: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-icon:active {
    transform: translateY(0);
}

.btn-icon i {
    font-size: 14px;
}

.btn-icon.refreshing i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #2d3748;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    padding: 0;
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #3182ce;
    margin: 0;
}

.checkbox-label i {
    color: #3182ce;
    font-size: 13px;
}

.checkbox-label span {
    white-space: nowrap;
}

.checkbox-label:hover {
    color: #3182ce;
}

/* Camera Controls */
.camera-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1rem;
}

.camera-status {
    margin-bottom: 1rem;
}

.camera-preview {
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.camera-preview video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.camera-preview video.rotated-180 {
    transform: rotate(180deg);
}

.camera-preview canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

/* Camera preview loading state */
.camera-preview.loading::after {
    content: 'Loading camera...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background: rgba(0,0,0,0.7);
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
}

/* Enhanced button styles for camera controls */
.camera-controls .btn {
    margin-bottom: 5px;
}

.camera-controls .btn:disabled {
    opacity: 0.6;
}